| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2009 Google Inc. All rights reserved. | 3 # Copyright (c) 2009 Google Inc. All rights reserved. |
| 4 # | 4 # |
| 5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
| 6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
| 7 # met: | 7 # met: |
| 8 # | 8 # |
| 9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
| 10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
| (...skipping 6061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6072 global _line_length | 6072 global _line_length |
| 6073 try: | 6073 try: |
| 6074 _line_length = int(val) | 6074 _line_length = int(val) |
| 6075 except ValueError: | 6075 except ValueError: |
| 6076 PrintUsage('Line length must be digits.') | 6076 PrintUsage('Line length must be digits.') |
| 6077 elif opt == '--extensions': | 6077 elif opt == '--extensions': |
| 6078 global _valid_extensions | 6078 global _valid_extensions |
| 6079 try: | 6079 try: |
| 6080 _valid_extensions = set(val.split(',')) | 6080 _valid_extensions = set(val.split(',')) |
| 6081 except ValueError: | 6081 except ValueError: |
| 6082 PrintUsage('Extensions must be comma seperated list.') | 6082 PrintUsage('Extensions must be comma separated list.') |
| 6083 | 6083 |
| 6084 if not filenames: | 6084 if not filenames: |
| 6085 PrintUsage('No files were specified.') | 6085 PrintUsage('No files were specified.') |
| 6086 | 6086 |
| 6087 _SetOutputFormat(output_format) | 6087 _SetOutputFormat(output_format) |
| 6088 _SetVerboseLevel(verbosity) | 6088 _SetVerboseLevel(verbosity) |
| 6089 _SetFilters(filters) | 6089 _SetFilters(filters) |
| 6090 _SetCountingStyle(counting_style) | 6090 _SetCountingStyle(counting_style) |
| 6091 | 6091 |
| 6092 return filenames | 6092 return filenames |
| (...skipping 12 matching lines...) Expand all Loading... |
| 6105 _cpplint_state.ResetErrorCounts() | 6105 _cpplint_state.ResetErrorCounts() |
| 6106 for filename in filenames: | 6106 for filename in filenames: |
| 6107 ProcessFile(filename, _cpplint_state.verbose_level) | 6107 ProcessFile(filename, _cpplint_state.verbose_level) |
| 6108 _cpplint_state.PrintErrorCounts() | 6108 _cpplint_state.PrintErrorCounts() |
| 6109 | 6109 |
| 6110 sys.exit(_cpplint_state.error_count > 0) | 6110 sys.exit(_cpplint_state.error_count > 0) |
| 6111 | 6111 |
| 6112 | 6112 |
| 6113 if __name__ == '__main__': | 6113 if __name__ == '__main__': |
| 6114 main() | 6114 main() |
| OLD | NEW |