parameters: (source_files)
return_statement: return all_errors
docstring: Run everything, given a list of source_files
  
      Args:
      -----
      * source_files (list of str): list of paths
  
      Returns:
      --------
  
      all_errors (list of dict): one entry per error, with the following keys:
          ['file', 'function', 'line_num', 'line']
docstring_summary: Run everything, given a list of source_files
docstring_tokens: Run everything given a list of source_files
function: def get_all_errors(source_files):
      """
      Run everything, given a list of source_files
  
      Args:
      -----
      * source_files (list of str): list of paths
  
      Returns:
      --------
  
      all_errors (list of dict): one entry per error, with the following keys:
          ['file', 'function', 'line_num', 'line']
      """
  
      all_errors = []
  
      for source_file in source_files:
          rel_file = os.path.relpath(source_file, start=REPO_ROOT)
          try:
              header_file = infer_header_from_source(source_file)
          except ValueError:
              if (rel_file not in EXPECT_MISSING_HEADER) and INCLUDE_WARNINGS:
                  msg = ("Cannot find header file for "
                         "{}".format(rel_file))
                  if IS_CI:
                      ci_msg = {'tool': 'find_byref_bool_overide',
                                'file': rel_file,
                                'messagetype': 'warning',
                                'message': msg
                                }
                      print(json.dumps(ci_msg))
                  else:
                      warnings.warn(msg)
              continue
  
          try:
              found_functions = parse_function_signatures_in_header(header_file)
          except ValueError as e:
              if (rel_file not in EXPECT_MISSING_NAMESPACE) and INCLUDE_WARNINGS:
                  if IS_CI:
                      ci_msg = {
                          'tool': 'find_byref_bool_override',
                          'file': rel_file,
                          'messagetype': 'warning',
                          'message': str(e)
                      }
                      print(json.dumps(ci_msg))
                  else:
                      warnings.warn(str(e))
              continue
          if not found_functions:
              # print("No problem for {}".format(rel_file))
              pass
          else:
              errors = lookup_errors_in_source_file(source_file, found_functions)
              if errors:
                  all_errors += errors
  
      # Sort errors by file
      all_errors.sort(key=lambda x: x['file'], reverse=False)
  
      return all_errors
function_tokens: def get_all_errors ( source_files ) : all_errors = [ ] for source_file in source_files : rel_file = os . path . relpath ( source_file , start = REPO_ROOT ) try : header_file = infer_header_from_source ( source_file ) except ValueError : if ( rel_file not in EXPECT_MISSING_HEADER ) and INCLUDE_WARNINGS : msg = ( "Cannot find header file for " "{}" . format ( rel_file ) ) if IS_CI : ci_msg = { 'tool' : 'find_byref_bool_overide' , 'file' : rel_file , 'messagetype' : 'warning' , 'message' : msg } print ( json . dumps ( ci_msg ) ) else : warnings . warn ( msg ) continue try : found_functions = parse_function_signatures_in_header ( header_file ) except ValueError as e : if ( rel_file not in EXPECT_MISSING_NAMESPACE ) and INCLUDE_WARNINGS : if IS_CI : ci_msg = { 'tool' : 'find_byref_bool_override' , 'file' : rel_file , 'messagetype' : 'warning' , 'message' : str ( e ) } print ( json . dumps ( ci_msg ) ) else : warnings . warn ( str ( e ) ) continue if not found_functions : # print("No problem for {}".format(rel_file)) pass else : errors = lookup_errors_in_source_file ( source_file , found_functions ) if errors : all_errors += errors # Sort errors by file all_errors . sort ( key = lambda x : x [ 'file' ] , reverse = False ) return all_errors