OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """\ | 6 """\ |
7 Wrapper script around Rietveld's upload.py that simplifies working with groups | 7 Wrapper script around Rietveld's upload.py that simplifies working with groups |
8 of files. | 8 of files. |
9 """ | 9 """ |
10 | 10 |
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1122 filenames = cpplint.ParseArguments(args + change_info.GetFileNames()) | 1122 filenames = cpplint.ParseArguments(args + change_info.GetFileNames()) |
1123 | 1123 |
1124 white_list = GetCodeReviewSetting("LINT_REGEX") | 1124 white_list = GetCodeReviewSetting("LINT_REGEX") |
1125 if not white_list: | 1125 if not white_list: |
1126 white_list = DEFAULT_LINT_REGEX | 1126 white_list = DEFAULT_LINT_REGEX |
1127 white_regex = re.compile(white_list) | 1127 white_regex = re.compile(white_list) |
1128 black_list = GetCodeReviewSetting("LINT_IGNORE_REGEX") | 1128 black_list = GetCodeReviewSetting("LINT_IGNORE_REGEX") |
1129 if not black_list: | 1129 if not black_list: |
1130 black_list = DEFAULT_LINT_IGNORE_REGEX | 1130 black_list = DEFAULT_LINT_IGNORE_REGEX |
1131 black_regex = re.compile(black_list) | 1131 black_regex = re.compile(black_list) |
| 1132 # Access to a protected member _XX of a client class |
| 1133 # pylint: disable=W0212 |
1132 for filename in filenames: | 1134 for filename in filenames: |
1133 if white_regex.match(filename): | 1135 if white_regex.match(filename): |
1134 if black_regex.match(filename): | 1136 if black_regex.match(filename): |
1135 print "Ignoring file %s" % filename | 1137 print "Ignoring file %s" % filename |
1136 else: | 1138 else: |
1137 cpplint.ProcessFile(filename, cpplint._cpplint_state.verbose_level) | 1139 cpplint.ProcessFile(filename, cpplint._cpplint_state.verbose_level) |
1138 else: | 1140 else: |
1139 print "Skipping file %s" % filename | 1141 print "Skipping file %s" % filename |
1140 | 1142 |
1141 print "Total errors found: %d\n" % cpplint._cpplint_state.error_count | 1143 print "Total errors found: %d\n" % cpplint._cpplint_state.error_count |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1377 if e.code != 500: | 1379 if e.code != 500: |
1378 raise | 1380 raise |
1379 print >> sys.stderr, ( | 1381 print >> sys.stderr, ( |
1380 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1382 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
1381 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) | 1383 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) |
1382 return 1 | 1384 return 1 |
1383 | 1385 |
1384 | 1386 |
1385 if __name__ == "__main__": | 1387 if __name__ == "__main__": |
1386 sys.exit(main(sys.argv[1:])) | 1388 sys.exit(main(sys.argv[1:])) |
OLD | NEW |