Closed Bug 1107523 Opened 10 years ago Closed 9 years ago

Run flake8 as part of the Travis run

Categories

(Tree Management :: Treeherder, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

Details

Attachments

(2 files)

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.
Component: Treeherder → Treeherder: Docs & Development
Priority: -- → P3
Assignee: nobody → emorley
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+
Attachment #8550334 - Flags: checkin+
Priority: P3 → P4
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.
Priority: P4 → P3
Summary: Use Python linters as part of the Travis run (pyflakes/pep8/...) → Run flake8 as part of the Travis run
Attachment #8572140 - Flags: review?(cdawson)
Status: NEW → ASSIGNED
Attachment #8572140 - Flags: review?(cdawson) → review+
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.
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
Closed: 9 years ago
Depends on: 1139894
Resolution: --- → FIXED
Depends on: 1143086
Depends on: 1169915
Component: Treeherder: Docs & Development → TreeHerder
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: