diff options
author | Robert Guo <robert.guo@10gen.com> | 2018-06-04 09:17:28 -0400 |
---|---|---|
committer | Robert Guo <robert.guo@10gen.com> | 2018-06-04 17:30:41 -0400 |
commit | f65f3f4d283b7789181e28d98b24972189b6c6cc (patch) | |
tree | da2d36d51af68af4e23822c07bb2ace44506bb6a | |
parent | 9b1a0cadf91e988c780f072be64175c1c3b1e577 (diff) | |
download | mongo-f65f3f4d283b7789181e28d98b24972189b6c6cc.tar.gz |
SERVER-35144 wait for all Python linters to finish if one fails
(cherry picked from commit 8309ad48487cb0529fc2153b5231f61e9a597db6)
-rwxr-xr-x | buildscripts/pylinters.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/buildscripts/pylinters.py b/buildscripts/pylinters.py index 87d785d7231..16e987f0da8 100755 --- a/buildscripts/pylinters.py +++ b/buildscripts/pylinters.py @@ -76,13 +76,18 @@ def _lint_files(linters, config_dict, file_names): if not linter_instances: sys.exit(1) + failed_lint = False + for linter in linter_instances: run_fix = lambda param1: lint_runner.run_lint(linter, param1) # pylint: disable=cell-var-from-loop lint_clean = parallel.parallel_process([os.path.abspath(f) for f in file_names], run_fix) if not lint_clean: - print("ERROR: Code Style does not match coding style") - sys.exit(1) + failed_lint = True + + if failed_lint: + print("ERROR: Code Style does not match coding style") + sys.exit(1) def lint_patch(linters, config_dict, file_name): |