Open
Bug 1295833
Opened 8 years ago
Updated 2 years ago
`mach bootstrap` should offer to enable the tools/lint/hooks.py mozlint hook
Categories
(Firefox Build System :: Bootstrap Configuration, defect)
Firefox Build System
Bootstrap Configuration
Tracking
(Not tracked)
NEW
People
(Reporter: jaws, Unassigned)
References
Details
eslint runs on the build server and will fail if eslint errors are introduced. Developers who work on frontend code should have this commit hook enabled, so we should offer it during mercurial-setup. It is already part of the repo at /tools/mercurial/eslintvalidate.py
Comment 1•7 years ago
|
||
After I've got bug 1360595 landed, I'll take a look at this and see if I can work out something for Mercurial and for git.
Assignee: nobody → standard8
Depends on: 1360595
Comment 2•7 years ago
|
||
At the moment I think this really depends on bug 1361972 - changing how the existing hooks work to provide simpler hooks overall. I'm unassigning myself for now, though I'd really like this to be done as soon as that one is done.
Assignee: standard8 → nobody
Depends on: 1361972
Updated•7 years ago
|
Summary: `mach mercurial-setup` should offer to enable the mozeslint.py commit hook → `mach mercurial-setup` should offer to enable the tools/lint/hooks.py mozlint hook
Comment 3•7 years ago
|
||
Andrew, any chance you (or someone) be able to help out (or take this on) with this? I started playing around, but then realised I'll need to deal with git and hg, and wasn't quite sure of the ideal structure for this or how long it'd take me.
Flags: needinfo?(ahalberstadt)
Comment 4•7 years ago
|
||
We should also make this work for bootstrap, rather than mercurial-setup, so that it works for git repos as well.
Summary: `mach mercurial-setup` should offer to enable the tools/lint/hooks.py mozlint hook → `mach bootstrap` should offer to enable the tools/lint/hooks.py mozlint hook
Comment 5•7 years ago
|
||
Ideally we'd have a single |mach vcs-setup| that handled both hg and git. Or maybe even just merge it into |mach bootstrap| entirely. But that's scope bloat for this bug, I guess putting this in bootstrap for now makes sense (gps might have opinions). I'm definitely happy to help out, though I don't think I'll have time to own it at this moment. I'll also ask around if anyone would be interested in taking this. Fwiw, I've also never modified mozboot, so I'm not a suitable reviewer. Gps would be the main owner, though he's on pto for a few weeks. I've asked on #build who the next best reviewer would be.
Component: mach → Build Config
Flags: needinfo?(ahalberstadt)
Comment 6•7 years ago
|
||
Looks like from that bug gps was leaning towards merging everything into |mach bootstrap|. So I guess putting this setup in there would make sense.
Comment 7•7 years ago
|
||
Or alternatively we can block on that bug and add this to |mach git-setup|
Comment 8•7 years ago
|
||
I was pondering about having a ./mach lint --setup, and then having that be called by bootstrap (since it'd be nice if eslint was also setup when bootstrap happens).
Comment 9•7 years ago
|
||
I like that! Each linter could define its own formal "setup" function that gets called on |mach lint --setup|. Would also give us place to implement this stuff without needing to worry about mercurial-setup/git-setup/bootstrap refactorings. After we get it implemented we can call it from the appropriate places depending on what happens in bug 1257478.
Updated•6 years ago
|
Product: Core → Firefox Build System
Updated•6 years ago
|
Component: General → Bootstrap Configuration
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•