parameters: ()
docstring: Entry point for scan-build command.
docstring_summary: Entry point for scan-build command.
docstring_tokens: Entry point for scan - build command .
function: def scan_build():
      """ Entry point for scan-build command. """
  
      args = parse_args_for_scan_build()
      # will re-assign the report directory as new output
      with report_directory(args.output, args.keep_empty) as args.output:
          # Run against a build command. there are cases, when analyzer run
          # is not required. But we need to set up everything for the
          # wrappers, because 'configure' needs to capture the CC/CXX values
          # for the Makefile.
          if args.intercept_first:
              # Run build command with intercept module.
              exit_code = capture(args)
              # Run the analyzer against the captured commands.
              if need_analyzer(args.build):
                  run_analyzer_parallel(args)
          else:
              # Run build command and analyzer with compiler wrappers.
              environment = setup_environment(args)
              exit_code = run_build(args.build, env=environment)
          # 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 exit_code
function_tokens: def scan_build ( ) : args = parse_args_for_scan_build ( ) # will re-assign the report directory as new output with report_directory ( args . output , args . keep_empty ) as args . output : # Run against a build command. there are cases, when analyzer run # is not required. But we need to set up everything for the # wrappers, because 'configure' needs to capture the CC/CXX values # for the Makefile. if args . intercept_first : # Run build command with intercept module. exit_code = capture ( args ) # Run the analyzer against the captured commands. if need_analyzer ( args . build ) : run_analyzer_parallel ( args ) else : # Run build command and analyzer with compiler wrappers. environment = setup_environment ( args ) exit_code = run_build ( args . build , env = environment ) # 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 exit_code