()
| 6221 | |
| 6222 | |
| 6223 | def main(): |
| 6224 | filenames = ParseArguments(sys.argv[1:]) |
| 6225 | |
| 6226 | # Change stderr to write with replacement characters so we don't die |
| 6227 | # if we try to print something containing non-ASCII characters. |
| 6228 | sys.stderr = codecs.StreamReaderWriter(sys.stderr, |
| 6229 | codecs.getreader('utf8'), |
| 6230 | codecs.getwriter('utf8'), |
| 6231 | 'replace') |
| 6232 | |
| 6233 | _cpplint_state.ResetErrorCounts() |
| 6234 | for filename in filenames: |
| 6235 | ProcessFile(filename, _cpplint_state.verbose_level) |
| 6236 | # If --quiet is passed, suppress printing error count unless there are errors. |
| 6237 | if not _cpplint_state.quiet or _cpplint_state.error_count > 0: |
| 6238 | _cpplint_state.PrintErrorCounts() |
| 6239 | |
| 6240 | sys.exit(_cpplint_state.error_count > 0) |
| 6241 | |
| 6242 | |
| 6243 | if __name__ == '__main__': |
no test coverage detected