parameters: (result, execution)
docstring: Implements analyzer compiler wrapper functionality.
docstring_summary: Implements analyzer compiler wrapper functionality.
docstring_tokens: Implements analyzer compiler wrapper functionality .
function: def analyze_compiler_wrapper_impl(result, execution):
      """ Implements analyzer compiler wrapper functionality. """
  
      # don't run analyzer when compilation fails. or when it's not requested.
      if result or not os.getenv('ANALYZE_BUILD_CLANG'):
          return
  
      # check is it a compilation?
      compilation = split_command(execution.cmd)
      if compilation is None:
          return
      # collect the needed parameters from environment, crash when missing
      parameters = {
          'clang': os.getenv('ANALYZE_BUILD_CLANG'),
          'output_dir': os.getenv('ANALYZE_BUILD_REPORT_DIR'),
          'output_format': os.getenv('ANALYZE_BUILD_REPORT_FORMAT'),
          'output_failures': os.getenv('ANALYZE_BUILD_REPORT_FAILURES'),
          'direct_args': os.getenv('ANALYZE_BUILD_PARAMETERS',
                                   '').split(' '),
          'force_debug': os.getenv('ANALYZE_BUILD_FORCE_DEBUG'),
          'directory': execution.cwd,
          'command': [execution.cmd[0], '-c'] + compilation.flags,
          'ctu': get_ctu_config_from_json(os.getenv('ANALYZE_BUILD_CTU'))
      }
      # call static analyzer against the compilation
      for source in compilation.files:
          parameters.update({'file': source})
          logging.debug('analyzer parameters %s', parameters)
          current = run(parameters)
          # display error message from the static analyzer
          if current is not None:
              for line in current['error_output']:
                  logging.info(line.rstrip())
function_tokens: def analyze_compiler_wrapper_impl ( result , execution ) : # don't run analyzer when compilation fails. or when it's not requested. if result or not os . getenv ( 'ANALYZE_BUILD_CLANG' ) : return # check is it a compilation? compilation = split_command ( execution . cmd ) if compilation is None : return # collect the needed parameters from environment, crash when missing parameters = { 'clang' : os . getenv ( 'ANALYZE_BUILD_CLANG' ) , 'output_dir' : os . getenv ( 'ANALYZE_BUILD_REPORT_DIR' ) , 'output_format' : os . getenv ( 'ANALYZE_BUILD_REPORT_FORMAT' ) , 'output_failures' : os . getenv ( 'ANALYZE_BUILD_REPORT_FAILURES' ) , 'direct_args' : os . getenv ( 'ANALYZE_BUILD_PARAMETERS' , '' ) . split ( ' ' ) , 'force_debug' : os . getenv ( 'ANALYZE_BUILD_FORCE_DEBUG' ) , 'directory' : execution . cwd , 'command' : [ execution . cmd [ 0 ] , '-c' ] + compilation . flags , 'ctu' : get_ctu_config_from_json ( os . getenv ( 'ANALYZE_BUILD_CTU' ) ) } # call static analyzer against the compilation for source in compilation . files : parameters . update ( { 'file' : source } ) logging . debug ( 'analyzer parameters %s' , parameters ) current = run ( parameters ) # display error message from the static analyzer if current is not None : for line in current [ 'error_output' ] : logging . info ( line . rstrip ( ) )