MCPcopy Index your code
hub / github.com/cpplint/cpplint / main

Function main

cpplint.py:7859–7880  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7857
7858
7859def main():
7860 filenames = ParseArguments(sys.argv[1:])
7861 backup_err = sys.stderr
7862 try:
7863 # Change stderr to write with replacement characters so we don't die
7864 # if we try to print something containing non-ASCII characters.
7865 sys.stderr = codecs.StreamReader(sys.stderr, "replace")
7866
7867 _cpplint_state.ResetErrorCounts()
7868 for filename in filenames:
7869 ProcessFile(filename, _cpplint_state.verbose_level)
7870 # If --quiet is passed, suppress printing error count unless there are errors.
7871 if not _cpplint_state.quiet or _cpplint_state.error_count > 0:
7872 _cpplint_state.PrintErrorCounts()
7873
7874 if _cpplint_state.output_format == "junit":
7875 sys.stderr.write(_cpplint_state.FormatJUnitXML())
7876
7877 finally:
7878 sys.stderr = backup_err
7879
7880 sys.exit(_cpplint_state.error_count > 0)
7881
7882
7883if __name__ == "__main__":

Callers 1

cpplint.pyFile · 0.85

Calls 5

ParseArgumentsFunction · 0.85
ProcessFileFunction · 0.85
ResetErrorCountsMethod · 0.80
PrintErrorCountsMethod · 0.80
FormatJUnitXMLMethod · 0.80

Tested by

no test coverage detected