diff options
author | Alexandre Flament <alex@al-f.net> | 2020-11-16 09:45:00 +0100 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2020-12-01 15:21:19 +0100 |
commit | 8aa2a7556ad80d3d644287fc17832050f3a5a303 (patch) | |
tree | b7b98f65cf6cc8127f1d6a06e37419fe45222871 | |
parent | b00d108673082fc2487b2d122db00d988f561427 (diff) | |
download | searxng-8aa2a7556ad80d3d644287fc17832050f3a5a303.tar.gz searxng-8aa2a7556ad80d3d644287fc17832050f3a5a303.zip |
[enh] activate pylint
There are 3 invocations:
* one with the default .pylintrc file
* one for searx/engines with some disabled checks and some additional-builtins
* one for the all the code except the engines with some disabled checks
-rw-r--r-- | Makefile | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -13,6 +13,8 @@ include utils/makefile.include PYOBJECTS = searx DOC = docs PY_SETUP_EXTRAS ?= \[test\] +PYLINT_SEARX_DISABLE_OPTION := I,C,R,W0105,W0212,W0511,W0603,W0613,W0621,W0702,W0703,W1401 +PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES := supported_languages,language_aliases include utils/makefile.python include utils/makefile.sphinx @@ -210,8 +212,8 @@ gecko.driver: PHONY += test test.sh test.pylint test.pep8 test.unit test.coverage test.robot test: buildenv test.pylint test.pep8 test.unit gecko.driver test.robot -# TODO: balance linting with pylint +# TODO: balance linting with pylint test.pylint: pyenvinstall $(call cmd,pylint,\ searx/preferences.py \ @@ -219,6 +221,16 @@ test.pylint: pyenvinstall searx/engines/gigablast.py \ searx/engines/deviantart.py \ ) + $(call cmd,pylint,\ + --disable=$(PYLINT_SEARX_DISABLE_OPTION) \ + --additional-builtins=$(PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES) \ + searx/engines \ + ) + $(call cmd,pylint,\ + --disable=$(PYLINT_SEARX_DISABLE_OPTION) \ + --ignore=searx/engines \ + searx tests \ + ) # ignored rules: # E402 module level import not at top of file |