Граф коммитов

5 Коммитов

Автор SHA1 Сообщение Дата
Mark Banner 4da30e3721 Bug 1386351 - Let the Lint hook default to pre-push (for git) if being called directly. r=glandium
MozReview-Commit-ID: 9TnLu8w92oN
2017-11-23 09:09:33 +00:00
Andrew Halberstadt c10125cefb Bug 1405588 - [lint] Stop forwarding 'args' in the git pre-push hook, r=standard8
The args passed in from the git pre-push hook aren't necessarily a valid ref,
so can result in failure. By default, the git implementation should be smart
enough to automatically determine which ref to compare against, so passing this
in from the hook shouldn't be necessary.

MozReview-Commit-ID: ESMQqbeGOHd

--HG--
extra : rebase_source : 3c363b6c531f278d7c5b3ddf41fb0f16e79966dc
2017-11-01 17:07:18 -04:00
Andrew Halberstadt fea81eb80e Bug 1382140 - Call 'mach' with python from tools/lint/hooks.py so it works on Windows, r=mak
MozReview-Commit-ID: 7Iac4wqX9RG

--HG--
extra : rebase_source : 9dc9a4801808c9639ca4e930d1c601ec18171f72
2017-07-24 12:25:53 -04:00
Andrew Halberstadt 892b80966e 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
2017-07-11 17:02:46 -04:00
Andrew Halberstadt fbede0d83d Bug 1361972 - Add a pre-push and pre-commit mozlint hooks r=standard8
This adds pre-push and pre-commit hooks for both hg and git. All
four possibilities are implemented in the same file.

To enable a pre-push hg hook, add the following to hgrc:

    [hooks]
    pre-push.lint = python:/path/to/gecko/tools/lint/hooks.py:hg


To enable a pre-commit hg hook, add the following to hgrc:

    [hooks]
    pretxncommit.lint = python:/path/to/gecko/tools/lint/hooks.py:hg


To enable a pre-push git hook, run the following command:

    $ ln -s /path/to/gecko/tools/lint/hooks.py .git/hooks/pre-push


To enable a pre-commit git hook, run the following command:

    $ ln -s /path/to/gecko/tools/lint/hooks.py .git/hooks/pre-commit


MozReview-Commit-ID: DUxCKN2fiag

--HG--
extra : rebase_source : 67c97a3fd8adc50d6bb3c488345077065b63de7d
2017-06-30 18:29:42 -07:00