Add python/mozbuild/mozpack to the flake8 linter
Categories
(Firefox Build System :: General, enhancement)
Tracking
(firefox67 fixed)
| Tracking | Status | |
|---|---|---|
| firefox67 | --- | fixed |
People
(Reporter: ahal, Assigned: kerlynmanyi, Mentored)
References
Details
Attachments
(1 obsolete file)
We should start linting python/mozbuild. Because there are almost 2500 issues, I'd propose we break the work up to make it a bit more manageable. While |mach lint --fix| is able to get this down to 700 issues, that is still a lot of work.
This bug will specifically focus on python/mozbuild/mozpack (which only has 136 errors of which 27 need to be fixed manually).
The steps for fixing this bug are:
-
Add python/mozbuild/mozpack to the flake8 config file here:
https://searchfox.org/mozilla-central/source/tools/lint/flake8.yml -
Run flake8 with this command:
$ ./mach lint -l flake8 python/mozbuild/mozpackThis will show all 136 errors.
-
Run the automatic fixer:
$ ./mach lint -l flake8 python/mozbuild/mozpack --fixThis will show a significantly reduced set.
-
Commit the result.
-
Fix the remaining errors (and amend to commit when finished). If unsure about how to fix a particular issue feel free to post here or send me a message on irc/email.
Good luck!
| Reporter | ||
Comment 2•6 years ago
|
||
Thanks Kerlyn, don't hesitate to reach out if you have questions!
Before this change linting python/mozbuild brought about many errors. Some of this errors could be fixed using |mach lint --fix|. The remaining errors where fixed in this bug.
Updated•6 years ago
|
Updated•6 years ago
|
Comment 5•6 years ago
|
||
| bugherder | ||
Description
•