platform_external_selinux/scripts
Nicolas Iooss 41764b73a7
Travis-CI: run flake8 on Python code
flake8 is a Python linter which is able to detect issues in Python code
(syntax errors, undefined variables, etc.). It has been used to find
bugs in the project. In order to prevent the introduction of new bugs
which can be detected by it, add a script which runs it and use it in
Travis-CI.

flake8 can be used to detect code which is not written according to PEP8
style guide (which forbids whitespaces in some places, enforces the use
of space-indenting, specifies how many blank lines are used between
functions, etc.). As SELinux code does not follow this style guide,
scripts/run-flake8 disables many warnings related to this when running
the linter.

In order to silence flake8 warnings, the Python code can also be
modified. However fixing every "do not use bare 'except'" in the project
needs to be done carefully and takes much time.
This is why the warnings which are disabled have been ordered in three
lists:
* The warnings which can be activated in a not-so-distant future after
  the code has been modified.
* The warnings related to PEP8 which cannot be activated without a major
  cleaning work of the codebase (for example to modify white spaces)
* The warnings which are introduced by code generated by SWIG 3.0.12,
  which would require patches in SWIG in order to be activated (there
  is right now only one such warning).

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2018-08-18 12:00:24 +02:00
..
.gitignore scripts: add a helper script to run clang's static analyzer 2018-06-15 09:03:17 -04:00
Lindent Update to latest Lindent script from kernel tree. 2013-10-30 14:34:25 -04:00
make-update Add make-update script and fix release script. 2013-10-31 14:34:02 -04:00
release Fix release script 2016-11-16 11:19:51 -05:00
run-flake8 Travis-CI: run flake8 on Python code 2018-08-18 12:00:24 +02:00
run-scan-build scripts: add a helper script to run clang's static analyzer 2018-06-15 09:03:17 -04:00