()
| 6886 | return child == os.path.join(prefix, child_suffix) |
| 6887 | |
| 6888 | def main(): |
| 6889 | filenames = ParseArguments(sys.argv[1:]) |
| 6890 | backup_err = sys.stderr |
| 6891 | try: |
| 6892 | # Change stderr to write with replacement characters so we don't die |
| 6893 | # if we try to print something containing non-ASCII characters. |
| 6894 | sys.stderr = codecs.StreamReader(sys.stderr, 'replace') |
| 6895 | |
| 6896 | _cpplint_state.ResetErrorCounts() |
| 6897 | for filename in filenames: |
| 6898 | ProcessFile(filename, _cpplint_state.verbose_level) |
| 6899 | # If --quiet is passed, suppress printing error count unless there are errors. |
| 6900 | if not _cpplint_state.quiet or _cpplint_state.error_count > 0: |
| 6901 | _cpplint_state.PrintErrorCounts() |
| 6902 | |
| 6903 | if _cpplint_state.output_format == 'junit': |
| 6904 | sys.stderr.write(_cpplint_state.FormatJUnitXML()) |
| 6905 | |
| 6906 | finally: |
| 6907 | sys.stderr = backup_err |
| 6908 | |
| 6909 | sys.exit(_cpplint_state.error_count > 0) |
| 6910 | |
| 6911 | |
| 6912 | if __name__ == '__main__': |
no test coverage detected