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>