From 892b80966e975c638f972b27f2c8d9e8d035be3b Mon Sep 17 00:00:00 2001 From: Andrew Halberstadt Date: Tue, 11 Jul 2017 17:02:46 -0400 Subject: [PATCH] Bug 1380135 - Use --quiet to ignore eslint warnings from the vcs hook; add +x to hooks.py, r=standard8 The eslint task ignores warnings, therefore the vcs hook should as well. The --quiet argument will be ignored by other linters. This also makes tools/lint/hooks.py executable which was preventing it from being used on git. MozReview-Commit-ID: DXbx01shJmX --HG-- extra : rebase_source : 9c80a069f486c0b6b7b9c970b84d44b964c59a0f --- tools/lint/hooks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 tools/lint/hooks.py diff --git a/tools/lint/hooks.py b/tools/lint/hooks.py old mode 100644 new mode 100755 index 2137c77d4fc4..6b02c1db33db --- a/tools/lint/hooks.py +++ b/tools/lint/hooks.py @@ -12,7 +12,8 @@ topsrcdir = os.path.join(here, os.pardir, os.pardir) def run_mozlint(hooktype, args): - cmd = [os.path.join(topsrcdir, 'mach'), 'lint'] + # --quiet prevents warnings on eslint, it will be ignored by other linters + cmd = [os.path.join(topsrcdir, 'mach'), 'lint', '--quiet'] if 'commit' in hooktype: # don't prevent commits, just display the lint results