Add linting with flake8 tool
authorPetr Štetiar <ynezz@true.cz>
Sat, 23 Dec 2023 06:13:02 +0000 (06:13 +0000)
committerPetr Štetiar <ynezz@true.cz>
Sat, 13 Apr 2024 04:17:49 +0000 (06:17 +0200)
commit815fc1af29a293c0095b7e6e0e6cba068fe081b9
treeb7a3a558d45fa4f15624ed90886599e4017ff9d9
parent88b6d9eae0ebf66c165be3e7458d6ff582d63759
Add linting with flake8 tool

flake8 is a Python tool that glues together pycodestyle, pyflakes,
mccabe, and third-party plugins to check the style and quality of some
Python code.

Currently we've issue in phase2 in checksum step:

 /bin/sh: 2: Syntax error: ")" unexpected

And it seems, that flake8 is able to spot places which might lead to
such issues during runtime:

 phase2/master.cfg:733:151: W605 invalid escape sequence '\('
 phase2/master.cfg:733:155: W605 invalid escape sequence '\)'
 phase2/master.cfg:733:158: W605 invalid escape sequence '\('
 phase2/master.cfg:733:162: W605 invalid escape sequence '\)'

So lets enable flake8 checking on the CI so we can spot similar places
in the future and address them before deployment.

We dont want to make current ongoing work on phase2 code harder, thus we
don't touch that part yet, so we whitelist most of the checks for now.

References: f0faed2970dd ("phase2: compute checksums")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
.flake8 [new file with mode: 0644]
.github/workflows/build-push.yml
.gitignore
phase1/master.cfg
requirements-dev.txt