Closed Bug 1377254 Opened 7 years ago Closed 7 years ago

Run flake8 on all code in CI

Categories

(Socorro :: General, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: peterbe, Assigned: willkg)

References

Details

Attachments

(4 files)

We currently run flake8 on all codes in webapp-django, meaning you can't pass CI with "linting errors". 

We don't do that for the "non-webapp-django" code (e.g. the ./socorro/ directory). 

We should run flake8 on ALL code and run flake8 in CI on ALL code.
Let's slowly do them all "one at a time"
https://github.com/mozilla-services/socorro/pull/3836
Commit pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/34f578c1328b27d2d586857143074b2383f249e5
Bug 1377254 flake8 unittests (#3836)

* bug 1377254 - flake8 unittests

* test_processor_2015.py

* test_legacy_processor.py

* a bunch of autopep8
Commit pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/e42a8b60e54d3b450e8b3fda1936a7c500196bfd
bug 1377254 - flake8 all socorro.external.postgres (#3856)

* bug 1377254 - flake8 all socorro.external.postgres

* undo

* nit

* nites
Commit pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/778dbb949049f7e7c18446aa55711377b6b17304
bug 1377254 fix lint issues in socorro/lib/ (#3902)

* bug 1377254 - pep8 datetimeutil

Minor cleanup for datetimeutil.

* bug 1377254 - remove prioritize

This had flake8 issues, but it's not used anywhere, so I removed it.

* bug 1377254 - clean up easy linting issues in socorro/lib/

* bug 1377254 - fix lint issues in socorro/lib/util.py

In the process of doing this, I removed a bunch of code that's not used
anywhere, too.

* bug 1377254 - remove unused bits in socorro/lib/ver_tools.py

* bug 1377254 - clean up socorro/lib/ooid.py

* Fix two lines that were too long
Grabbing this to finish it up.
Assignee: nobody → willkg
Status: NEW → ASSIGNED
Commit pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/72f025795dd62996e3932e0892325bd245f562ec
bug 1377254 - flake8 socorro code [no rush] (#4028)

* bug 1377254 - flake8 socorro/app and remove generic_app

generic_app was just a redirect to other things, so I removed it and updated all
the things that referred to it.

* bug 1377254 - flake8 socorro/cron/

* bug 1377254 - flake8 socorro/processor/

* bug 1377254 - flake8 socorro/schemas/

* bug 1377254 - flake8 socorro/submitter/

* Rename generic_app.rst
Commits pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/4cfe356145a5af8a6877668e3210fec592f6ffcc
bug 1377254 - flake8 socorro/external/

* fixes flake8 issues
* drops socorro/external/fs/crashstorage.py's dates_to_strings_for_json and
  reimplements it as the unenthusing name JsonDTISOEncoder in
  socorro/lib/datetimeutil.py
* removes commented out code and unused code
* adds a file-level "noqa" to socorro/external/postgresql/staticdata.py which
  isn't great, but that file is full of long lines and it's static data used
  only to set up local development environments
* adds a file-level "noqa" to socorro/external/statsd/crashstorage.py because
  that file is just a namespace for backwards-compatibility

https://github.com/mozilla-services/socorro/commit/a04d88bc54953bad3ce515024db5eebd642ce4c0
Merge pull request #4030 from willkg/1377254-external

bug 1377254 - flake8 socorro/external/ [no rush]
Commits pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/4b00c2fe74dea84a297d76164a0bdb876adf4fda
bug 1377254 - flake8 socorro/database/

This removes two files that aren't used anywhere, then tidies up the third.

https://github.com/mozilla-services/socorro/commit/eb41846edf82acc6d993f1aaf86271ad0546731b
Merge pull request #4029 from willkg/1377254-database

bug 1377254 - flake8 socorro/database/ [no rush]
All the linting fixes have landed. The last thing to do here is to remove the linting step from running the webapp tests and then add a linting step to Travis and Circle that covers the whole codebase.
I was working on the last bit, but then ran into a bunch of stuff that never got linted. I'm not sure how I missed them.
Commits pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/866997e8e8dad2ba69242aeaaf0e140d1b9c172f
bug 1377254 - fix flake8 exclusions

https://github.com/mozilla-services/socorro/commit/017ed7dea053203fd89b96e22a1e8a3a06ccb3a5
bug 1377254 - fix docker/ lint issues

https://github.com/mozilla-services/socorro/commit/4518ff8d443aa9520d6e71cfa6cb1e77e245745b
bug 1377254 - flake8 socorro/unittest/app/*

https://github.com/mozilla-services/socorro/commit/80106a01fed5453a4fd6a6c07ea83d9e50ec1748
bug 1377254 - flake8 socorro/unittest/cron/*

https://github.com/mozilla-services/socorro/commit/0224fd50421fc3c61d6833f75b0223d24a03f215
bug 1377254 - flake8 socorro/unittest/lib/*

https://github.com/mozilla-services/socorro/commit/98f16185bbb34914142e48cc4edc2718fb9d56e2
bug 1377254 - flake8 socorro/unittest/processor/*

https://github.com/mozilla-services/socorro/commit/142a40b7eae3b28389a0f2aa20a78eafd9f0ed66
bug 1377254 - flake8 socorro/unittest/*

https://github.com/mozilla-services/socorro/commit/3d92b9da7cc9468767e11396d446d7eed314be61
bug 1377254 - flake8 socorro/lib/*

https://github.com/mozilla-services/socorro/commit/abde7532d6d54849704ac7609dc691fcd9285ec6
bug 1377254 - flake8 scripts/database/*

https://github.com/mozilla-services/socorro/commit/9968b705fef834a7d76683b0a8eb0ba292ceeabb
bug 1377254 - fix misc files

https://github.com/mozilla-services/socorro/commit/60c27b33c4d8666d5f624cb98bc76a4809bcf8d5
fixes bug 1377254 - clean up CI code

This nixes some files we don't need anymore and switches the test scripts to run
pytest instead of webapp-django/bin/ci.sh.

This removes the ad-hoc linting we had in the webapp code and replaces it with
flake8 that's run in Circle, Travis, and local development environments.

This adds a few more directories to exclude for flake8.

https://github.com/mozilla-services/socorro/commit/7307244b8b327f4025319f647ca044c4484d43a9
Merge pull request #4055 from willkg/1377254-lint-in-ci

fixes bug 1377254 - lint in ci [no rush]
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: