Closed
Bug 1387830
Opened 7 years ago
Closed 7 years ago
Allow ./mach lint to print its available linters
Categories
(Developer Infrastructure :: Lint and Formatting, enhancement)
Tracking
(firefox57 fixed)
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: Callek, Assigned: Callek)
Details
Attachments
(1 file)
When thinking about using ./mach lint -l ... I've wondered what linters are available a few times. This should help.
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8894218 [details] Bug 1387830 - Make ./mach lint able to output available linters. https://reviewboard.mozilla.org/r/165300/#review171176 Thanks! ::: python/mozlint/mozlint/cli.py:30 (Diff revision 1) > 'default': [], > 'action': 'append', > 'help': "Linters to run, e.g 'eslint'. By default all linters " > "are run for all the appropriate files.", > }], > + [['--list-linters'], I think we could just call this `--list`. There's not much else it could be listing, so should be obvious what it's for. ::: python/mozlint/mozlint/cli.py:124 (Diff revision 1) > + if list_linters: > + lint_paths = find_linters(linters) > + print("Available linters: {}".format( > + [os.path.splitext(os.path.basename(l))[0] for l in lint_paths] > + )) > + sys.exit(0) nit: just use return 0 in case the thing calling this wants to keep going.
Attachment #8894218 -
Flags: review?(ahalberstadt) → review+
Comment hidden (mozreview-request) |
Pushed by Callek@gmail.com: https://hg.mozilla.org/integration/autoland/rev/393b0727cba4 Make ./mach lint able to output available linters. r=ahal
Backed out for flake8 failures like https://treeherder.mozilla.org/logviewer.html#?job_id=121696671&repo=autoland https://hg.mozilla.org/integration/autoland/rev/96f8096db6320a178dd3d6f44ae31385c92b8f28
Flags: needinfo?(bugspam.Callek)
Comment hidden (mozreview-request) |
Pushed by Callek@gmail.com: https://hg.mozilla.org/integration/autoland/rev/640c562833fc Make ./mach lint able to output available linters. r=ahal
Assignee | ||
Updated•7 years ago
|
Flags: needinfo?(bugspam.Callek)
Comment 8•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/640c562833fc
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Updated•6 years ago
|
Product: Testing → Firefox Build System
Updated•5 years ago
|
Version: Version 3 → 3 Branch
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•