|
37 | 37 | ] |
38 | 38 | IGNORED_FILES = [ |
39 | 39 | os.path.join('docs', 'conf.py'), |
| 40 | + # Both these files cause pylint 1.6 to barf. See: |
| 41 | + # https://github.com/PyCQA/pylint/issues/998 |
| 42 | + os.path.join('gcloud', 'bigtable', 'happybase', 'connection.py'), |
| 43 | + os.path.join('gcloud', 'streaming', 'http_wrapper.py'), |
40 | 44 | 'setup.py', |
41 | 45 | ] |
42 | 46 | SCRIPTS_DIR = os.path.abspath(os.path.dirname(__file__)) |
|
51 | 55 | 'import-error', |
52 | 56 | 'invalid-name', |
53 | 57 | 'missing-docstring', |
54 | | - 'missing-raises-doc', |
55 | | - 'missing-returns-doc', |
56 | 58 | 'no-init', |
57 | 59 | 'no-self-use', |
58 | 60 | 'superfluous-parens', |
@@ -227,13 +229,17 @@ def lint_fileset(filenames, rcfile, description): |
227 | 229 | if os.path.exists(filename)] |
228 | 230 | if filenames: |
229 | 231 | rc_flag = '--rcfile=%s' % (rcfile,) |
230 | | - pylint_shell_command = ['pylint', rc_flag] + filenames |
231 | | - status_code = subprocess.call(pylint_shell_command) |
232 | | - if status_code != 0: |
233 | | - error_message = ('Pylint failed on %s with ' |
234 | | - 'status %d.' % (description, status_code)) |
235 | | - print(error_message, file=sys.stderr) |
236 | | - sys.exit(status_code) |
| 232 | + pylint_shell_command = ['pylint', rc_flag] |
| 233 | + errors = {} # filename -> status_code |
| 234 | + for filename in filenames: |
| 235 | + cmd = pylint_shell_command + [filename] |
| 236 | + status_code = subprocess.call(cmd) |
| 237 | + if status_code != 0: |
| 238 | + errors[filename] = status_code |
| 239 | + if errors: |
| 240 | + for filename, status_code in sorted(errors.items()): |
| 241 | + print('%-30s: %d' % (filename, status_code), file=sys.stderr) |
| 242 | + sys.exit(len(errors)) |
237 | 243 | else: |
238 | 244 | print('Skipping %s, no files to lint.' % (description,)) |
239 | 245 |
|
|
0 commit comments