Closed
Bug 1281899
Opened 9 years ago
Closed 9 years ago
[mozlint] Ability to lint only files touched by a given commit series
Categories
(Developer Infrastructure :: Lint and Formatting, defect)
Developer Infrastructure
Lint and Formatting
Tracking
(firefox50 fixed)
RESOLVED
FIXED
mozilla50
| Tracking | Status | |
|---|---|---|
| firefox50 | --- | fixed |
People
(Reporter: ahal, Assigned: ahal)
Details
Attachments
(2 files, 1 obsolete file)
|
58 bytes,
text/x-review-board-request
|
smacleod
:
review+
|
Details |
|
Bug 1281899 - [mozlint] Add ability to lint files touched by revisions and/or the working directory,
58 bytes,
text/x-review-board-request
|
smacleod
:
review+
|
Details |
No description provided.
| Assignee | ||
Comment 1•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/60416/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/60416/
| Assignee | ||
Comment 2•9 years ago
|
||
There is currently no built-in user interface to mozlint. The only existing interface is the
external cli provided by |mach lint|. However, in the future mozlint may need to be used in a
context where mach isn't readily available (i.e version-control-tools). This patch basically
just moves the cli logic out of mach_commands.py, and into mozlint core. That way it can be
re-used in other places without needing to be re-implemented.
The |mach lint setup| subcommand was removed because apparently subcommands don't work with
the parser attribute. Nothing was using it yet anyway, so I removed it for now. It may get
re-added in some form in the future.
Review commit: https://reviewboard.mozilla.org/r/60560/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/60560/
Attachment #8765007 -
Flags: review?(smacleod)
Attachment #8765008 -
Flags: review?(smacleod)
| Assignee | ||
Comment 3•9 years ago
|
||
This adds two parameters, --rev and --workdir. Each works both with mercurial and git (though the syntax for
specifying revisions is different between them). The value is simply forwarded to either |hg log| or |git diff|
so syntax like |mach lint -r .~4::.| or |mach lint -r "HEAD~4 HEAD"| will work as expected.
Review commit: https://reviewboard.mozilla.org/r/60562/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/60562/
| Assignee | ||
Updated•9 years ago
|
Attachment #8764709 -
Attachment is obsolete: true
| Assignee | ||
Updated•9 years ago
|
Component: General → Lint
Comment 4•9 years ago
|
||
Comment on attachment 8765007 [details]
Bug 1281899 - [mozlint] Create cli module and move logic from tools/lint/mach_commands.py there,
https://reviewboard.mozilla.org/r/60560/#review59188
::: python/mozlint/mozlint/cli.py:83
(Diff revision 1)
> + status = 0
> + if results:
> + status = 1
might as well nuke this and just `return 1 if results else 0`
Attachment #8765007 -
Flags: review?(smacleod) → review+
Comment 5•9 years ago
|
||
Comment on attachment 8765008 [details]
Bug 1281899 - [mozlint] Add ability to lint files touched by revisions and/or the working directory,
https://reviewboard.mozilla.org/r/60562/#review59198
Attachment #8765008 -
Flags: review?(smacleod) → review+
| Assignee | ||
Comment 6•9 years ago
|
||
Comment on attachment 8765007 [details]
Bug 1281899 - [mozlint] Create cli module and move logic from tools/lint/mach_commands.py there,
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60560/diff/1-2/
| Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8765008 [details]
Bug 1281899 - [mozlint] Add ability to lint files touched by revisions and/or the working directory,
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60562/diff/1-2/
| Assignee | ||
Comment 8•9 years ago
|
||
Comment on attachment 8765007 [details]
Bug 1281899 - [mozlint] Create cli module and move logic from tools/lint/mach_commands.py there,
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60560/diff/2-3/
| Assignee | ||
Comment 9•9 years ago
|
||
Comment on attachment 8765008 [details]
Bug 1281899 - [mozlint] Add ability to lint files touched by revisions and/or the working directory,
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60562/diff/2-3/
Comment 10•9 years ago
|
||
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eaaff060e865
[mozlint] Create cli module and move logic from tools/lint/mach_commands.py there, r=smacleod
https://hg.mozilla.org/integration/autoland/rev/6984d7cf65bb
[mozlint] Add ability to lint files touched by revisions and/or the working directory, r=smacleod
Comment 11•9 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/eaaff060e865
https://hg.mozilla.org/mozilla-central/rev/6984d7cf65bb
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Updated•7 years ago
|
Product: Testing → Firefox Build System
Updated•3 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
•