parameters: (opts, continuation=report_failure)
docstring: It assembles the analysis command line and executes it. Capture the
      output of the analysis and returns with it. If failure reports are
      requested, it calls the continuation to generate it.
docstring_summary: It assembles the analysis command line and executes it. Capture the
      output of the analysis and returns with it. If failure reports are
      requested, it calls the continuation to generate it.
docstring_tokens: It assembles the analysis command line and executes it . Capture the output of the analysis and returns with it . If failure reports are requested it calls the continuation to generate it .
function: def run_analyzer(opts, continuation=report_failure):
      """ It assembles the analysis command line and executes it. Capture the
      output of the analysis and returns with it. If failure reports are
      requested, it calls the continuation to generate it. """
  
      def target():
          """ Creates output file name for reports. """
          if opts['output_format'] in {
                  'plist',
                  'plist-html',
                  'plist-multi-file'}:
              (handle, name) = tempfile.mkstemp(prefix='report-',
                                                suffix='.plist',
                                                dir=opts['output_dir'])
              os.close(handle)
              return name
          return opts['output_dir']
  
      try:
          cwd = opts['directory']
          cmd = get_arguments([opts['clang'], '--analyze'] +
                              opts['direct_args'] + opts['flags'] +
                              [opts['file'], '-o', target()],
                              cwd)
          output = run_command(cmd, cwd=cwd)
          return {'error_output': output, 'exit_code': 0}
      except subprocess.CalledProcessError as ex:
          result = {'error_output': ex.output, 'exit_code': ex.returncode}
          if opts.get('output_failures', False):
              opts.update(result)
              continuation(opts)
          return result
function_tokens: def run_analyzer ( opts , continuation = report_failure ) : def target ( ) : """ Creates output file name for reports. """ if opts [ 'output_format' ] in { 'plist' , 'plist-html' , 'plist-multi-file' } : ( handle , name ) = tempfile . mkstemp ( prefix = 'report-' , suffix = '.plist' , dir = opts [ 'output_dir' ] ) os . close ( handle ) return name return opts [ 'output_dir' ] try : cwd = opts [ 'directory' ] cmd = get_arguments ( [ opts [ 'clang' ] , '--analyze' ] + opts [ 'direct_args' ] + opts [ 'flags' ] + [ opts [ 'file' ] , '-o' , target ( ) ] , cwd ) output = run_command ( cmd , cwd = cwd ) return { 'error_output' : output , 'exit_code' : 0 } except subprocess . CalledProcessError as ex : result = { 'error_output' : ex . output , 'exit_code' : ex . returncode } if opts . get ( 'output_failures' , False ) : opts . update ( result ) continuation ( opts ) return result