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
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+
Commit pushed to master at https://github.com/mozilla/treeherder-service https://github.com/mozilla/treeherder-service/commit/c3ca042b8647d411483b1c15551a0ea5395ce8a0 Bug 1107523 - Add config file for pep8 and flake8
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
Created attachment 8572140 [details] [review] Run flake8 as part of the Travis build
Attachment #8572140 - Flags: review?(cdawson)
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
Last Resolved: 4 years ago
Depends on: 1139894
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.