mozlint: Add pylint as a new linter
Categories
(Developer Infrastructure :: Lint and Formatting, defect)
Tracking
(firefox79 fixed)
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: Sylvestre, Mentored)
References
Details
(Keywords: good-first-bug, Whiteboard: [lang=python])
Attachments
(4 files)
it finds issues that flake8 doesn't find
For example, the missing coma here:
https://searchfox.org/mozilla-central/source/dom/bindings/parser/WebIDL.py#3483-3484
https://searchfox.org/mozilla-central/source/dom/bindings/parser/WebIDL.py#5470-5473
dom/bindings/parser/WebIDL.py:3428:26: E1120: No value for argument 'locations' in constructor call (no-value-for-parameter)
dom/bindings/parser/WebIDL.py:5430:22: E1120: No value for argument 'locations' in constructor call (no-value-for-parameter)
Assignee | ||
Comment 1•3 years ago
|
||
To evaluate it, we should run it on directory on which we are running flake8 already. See if it does find interesting stuff
https://searchfox.org/mozilla-central/source/.flake8 (the exclude list)
Then we could add a new linter:
https://firefox-source-docs.mozilla.org/code-quality/lint/create.html
Adding a good first bug which is probably good second bug for someone who knows python already
Comment 2•3 years ago
|
||
IMO pylint is way too strict by default, we'd need to be very conscious of the rules we enable. Ideally we wouldn't want overlap between pylint
/ flake8
either so devs don't see duplicated issues.
Assignee | ||
Comment 3•3 years ago
|
||
Yeah, we should enable it on stuff that flake8 doesn't cover (at least no-value-for-parameter)
Assignee | ||
Comment 4•3 years ago
|
||
Here is what code is doing:
https://code.visualstudio.com/docs/python/linting#_pylint
Should be pretty easy to add.
Assignee | ||
Comment 5•3 years ago
|
||
Assignee | ||
Comment 6•3 years ago
|
||
Assignee | ||
Comment 7•3 years ago
|
||
Depends on D79099
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ba8087e38e6c mozlint: Add pylint as new linter r=linter-reviewers,ahal https://hg.mozilla.org/integration/autoland/rev/2ba0929ca2b5 mozlint: Add pylint to the CI r=linter-reviewers,ahal https://hg.mozilla.org/integration/autoland/rev/ef81294f5db7 mozlint: run pylint at review phase r=linter-reviewers,ahal
Comment 9•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ba8087e38e6c
https://hg.mozilla.org/mozilla-central/rev/2ba0929ca2b5
https://hg.mozilla.org/mozilla-central/rev/ef81294f5db7
Assignee | ||
Comment 10•3 years ago
|
||
Comment 11•3 years ago
|
||
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e16a500ce946 mozlint/pylint - follow up: fix a syntax issue in the rst file
Comment 12•3 years ago
|
||
bugherder |
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•7 months ago
|
Description
•