()
| 8008 | |
| 8009 | |
| 8010 | def main(): |
| 8011 | filenames = ParseArguments(sys.argv[1:]) |
| 8012 | backup_err = sys.stderr |
| 8013 | try: |
| 8014 | # Change stderr to write with replacement characters so we don't die |
| 8015 | # if we try to print something containing non-ASCII characters. |
| 8016 | sys.stderr = codecs.StreamReader(sys.stderr, "replace") |
| 8017 | |
| 8018 | _cpplint_state.ResetErrorCounts() |
| 8019 | for filename in filenames: |
| 8020 | ProcessFile(filename, _cpplint_state.verbose_level) |
| 8021 | # If --quiet is passed, suppress printing error count unless there are errors. |
| 8022 | if not _cpplint_state.quiet or _cpplint_state.error_count > 0: |
| 8023 | _cpplint_state.PrintErrorCounts() |
| 8024 | |
| 8025 | if _cpplint_state.output_format == "junit": |
| 8026 | sys.stderr.write(_cpplint_state.FormatJUnitXML()) |
| 8027 | |
| 8028 | finally: |
| 8029 | sys.stderr = backup_err |
| 8030 | |
| 8031 | sys.exit(_cpplint_state.error_count > 0) |
| 8032 | |
| 8033 | |
| 8034 | if __name__ == "__main__": |
no test coverage detected
searching dependent graphs…