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
This commit is contained in:
Andrew Halberstadt 2017-07-11 17:02:46 -04:00
parent 18f3dbf742
commit 892b80966e

3
tools/lint/hooks.py Normal file → Executable file
View File

@ -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