Closed Bug 1523835 Opened 10 months ago Closed 9 months ago

Add python/mozbuild/mozpack to the flake8 linter

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set

Tracking

(firefox67 fixed)

RESOLVED FIXED
mozilla67
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:

  1. Add python/mozbuild/mozpack to the flake8 config file here:
    https://searchfox.org/mozilla-central/source/tools/lint/flake8.yml

  2. Run flake8 with this command:

    $ ./mach lint -l flake8 python/mozbuild/mozpack
    

    This will show all 136 errors.

  3. Run the automatic fixer:

    $ ./mach lint -l flake8 python/mozbuild/mozpack --fix
    

    This will show a significantly reduced set.

  4. Commit the result.

  5. 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!

Hello Andrew, I will work on this issue.

Thanks Kerlyn, don't hesitate to reach out if you have questions!

Assignee: nobody → kerlynmanyi

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.

Attachment #9044604 - Attachment description: Added python/mozbuild/mozpack to the flake8 linter and solved the errors → Bug 1523835 - Added python/mozbuild/mozpack to the flake8 linter and solved the errors
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8a14a69f725a
Added python/mozbuild/mozpack to the flake8 linter and solved the errors, r=ahal
Attachment #9044604 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.