Beispiel #1
0
def analyze_build():
    """ Entry point for analyze-build command. """

    args = parse_args_for_analyze_build()
    with report_directory(args.output, args.keep_empty) as target_dir:
        # Run the analyzer against a compilation db.
        run_analyzer(args, target_dir)
        # Cover report generation and bug counting.
        number_of_bugs = document(args, target_dir, True)
        # Set exit status as it was requested.
        return number_of_bugs if args.status_bugs else 0
Beispiel #2
0
def analyze_build():
    """ Entry point for analyze-build command. """

    args = parse_args_for_analyze_build()
    with report_directory(args.output, args.keep_empty) as target_dir:
        # Run the analyzer against a compilation db.
        run_analyzer(args, target_dir)
        # Cover report generation and bug counting.
        number_of_bugs = document(args, target_dir, True)
        # Set exit status as it was requested.
        return number_of_bugs if args.status_bugs else 0
Beispiel #3
0
def analyze_build():
    """ Entry point for analyze-build command. """

    args = parse_args_for_analyze_build()
    # will re-assign the report directory as new output
    with report_directory(args.output, args.keep_empty) as args.output:
        # Run the analyzer against a compilation db.
        govern_analyzer_runs(args)
        # Cover report generation and bug counting.
        number_of_bugs = document(args)
        # Set exit status as it was requested.
        return number_of_bugs if args.status_bugs else 0
Beispiel #4
0
def analyze_build():
    """ Entry point for analyze-build command. """

    args = parse_args_for_analyze_build()
    # will re-assign the report directory as new output
    with report_directory(args.output, args.keep_empty) as args.output:
        # Run the analyzer against a compilation db.
        run_analyzer_parallel(args)
        # Cover report generation and bug counting.
        number_of_bugs = document(args)
        # Set exit status as it was requested.
        return number_of_bugs if args.status_bugs else 0
Beispiel #5
0
def analyze_build():
    # type: () -> int
    """ Entry point for analyze-build command. """

    args = parse_args_for_analyze_build()
    # will re-assign the report directory as new output
    with report_directory(args.output, args.keep_empty) as args.output:
        # run the analyzer against a compilation db
        compilations = CompilationDatabase.load(args.cdb)
        run_analyzer_parallel(compilations, args)
        # cover report generation and bug counting
        number_of_bugs = document(args)
        # set exit status as it was requested
        return number_of_bugs if args.status_bugs else 0
Beispiel #6
0
def analyze_build():
    # type: () -> int
    """ Entry point for analyze-build command. """

    args = parse_args_for_analyze_build()
    # will re-assign the report directory as new output
    with report_directory(args.output, args.keep_empty) as args.output:
        # run the analyzer against a compilation db
        compilations = CompilationDatabase.load(args.cdb)
        run_analyzer_parallel(compilations, args)
        # cover report generation and bug counting
        number_of_bugs = document(args)
        # set exit status as it was requested
        return number_of_bugs if args.status_bugs else 0