Run flake8 as part of the Travis run

RESOLVED FIXED

Status

P3
normal
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: emorley, Assigned: emorley)

Tracking

Details

Attachments

(2 attachments)

(Assignee)

Description

4 years ago
I'm not particularly attached to one linter vs another, moreso the fact that we actually use one, and use it as part of the travis run (and make it easy to run locally before pushing, eg: |grunt lint|).

We'll need to fix bug 1059811 and bug 1059814 first, or else whitelist current failures.
(Assignee)

Updated

4 years ago
Component: Treeherder → Treeherder: Docs & Development
(Assignee)

Updated

4 years ago
Priority: -- → P3
(Assignee)

Updated

4 years ago
Assignee: nobody → emorley
(Assignee)

Comment 1

4 years ago
Created attachment 8550334 [details] [review]
Add config file for pep8 and flake8

Initial config file for pep8/flake8. Whilst flake8 includes both pep8 and pyflakes, the pep8 config section is still required for running tools such as autopep8.

The config switches off the max line length error & excludes some directories - we may need to expand both of these in the future, but this should be fine for now :-)
Attachment #8550334 - Flags: review?(mdoglio)
Attachment #8550334 - Flags: review?(mdoglio) → review+
(Assignee)

Updated

4 years ago
Attachment #8550334 - Flags: checkin+
(Assignee)

Updated

4 years ago
Priority: P3 → P4
(Assignee)

Comment 3

4 years ago
All flake8 warnings (excl the ones we've turned off in the in-repo config file) are now fixed.

Once bug 1137278 is reviewed and lands, I'll rebase my local branch for making flake8 run on Travis.
(Assignee)

Updated

4 years ago
Priority: P4 → P3
Summary: Use Python linters as part of the Travis run (pyflakes/pep8/...) → Run flake8 as part of the Travis run
(Assignee)

Comment 4

4 years ago
Created attachment 8572140 [details] [review]
Run flake8 as part of the Travis build
Attachment #8572140 - Flags: review?(cdawson)
(Assignee)

Updated

4 years ago
Status: NEW → ASSIGNED
Attachment #8572140 - Flags: review?(cdawson) → review+

Comment 5

4 years ago
Commit pushed to master at https://github.com/mozilla/treeherder-service

https://github.com/mozilla/treeherder-service/commit/6273d32f7e623aab9f44a33eab81ff31bad3824f
Bug 1107523 - Run flake8 as part of the Travis build

flake8 is pyflakes+pep8. In a later PR I'll add a mention of it to the
docs - particularly how to set it up as a local git commit hook, but for
now I'm just keen to not regress the passing flake8 run. We may also
need to further tweak the ignore settings in setup.cfg if we find
certain warning types to be too annoying.
(Assignee)

Comment 6

4 years ago
Broken the docs part out to bug 1139894.

We must be extra vigilant to rebase PRs (both our own and contributors) on latest master before merging, since a green Travis run based on a parent prior to this landing, could turn red once merged.
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Depends on: 1139894
Resolution: --- → FIXED
(Assignee)

Updated

4 years ago
Depends on: 1143086
(Assignee)

Updated

4 years ago
Depends on: 1169915
You need to log in before you can comment on or make changes to this bug.