Commit 2967c955 authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

tune the pylint config

parent 32a5f195
......@@ -25,7 +25,8 @@ django_pylint:
# - /django/
script:
- echo $PYLINTHOME
- docker exec -i dev-django pylint3 --rcfile=.pylintrc allgo
# FIXME: allgo should not have to be in the path
- docker exec -i -e PYTHONPATH=allgo:. dev-django pylint3 --rcfile=.pylintrc allgo config jwt
allow_failure: true
#~ django_test:
......
#
#
# Generate a config file with the default rules (use a dummy rcfile, because by
# default the genrated file includes the content of the current .rcfile):
# pylint3 --rcfile=NONEXISTENT --load-plugins=pylint_django --generate-rcfile
#
# Test a single pylint rule:
# PYTHONPATH=allgo:. pylint3 config allgo config jwt tools --disable=all --enable=invalid-name
#
#
[MASTER]
# Python code to execute, usually for sys.path manipulation such as
......@@ -10,3 +20,56 @@ init-hook=sys.path.append("tools")
#load-plugins=
load-plugins=pylint_django,pylint_allgo
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
#extension-pkg-whitelist=
extension-pkg-whitelist=misaka
[MESSAGES CONTROL]
# we disable:
# - bad-continuation,bad-whitespace (uninteresting whitespace issues)
# - unused-argument,no-self-use (because it is very common when
# implement/reimplement methods in django's framework)
# - too-few-public-methods,broad-except,locally-disabled (pointless)
disable=bad-continuation,bad-whitespace,unused-argument,too-few-public-methods,broad-except,no-self-use,locally-disabled
[BASIC]
# PEP-8 assumes that globals are constants and that locals are variables, we don't
#
# also django's naming conventions do not fit with that model either (eg: urls,
# urlpatterns, custom_username_validators...)
#
#const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__)|(urls|urlpatterns|register))$
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__)|([a-z_][a-z0-9_]*))$
#variable-rgx=[a-z_][a-z0-9_]{2,30}$
variable-rgx=([a-z_][a-z0-9_]{2,30}|[A-Z_][A-Z0-9_]{2,30}|e|i|js|ip|mo|pk|fp|t[0-1])$
# Regular expression matching correct method names
# -> increase maxlength
#
#method-rgx=[a-z_][a-z0-9_]{2,30}$
method-rgx=[a-z_][a-z0-9_]{2,40}$
[DESIGN]
# Maximum number of arguments for function / method
#max-args=5
max-args=8
# Maximum number of attributes for a class (see R0902).
#max-attributes=7
max-attributes=20
# Maximum number of return / yield for function / method body
#max-returns=6
max-returns=10
[TYPECHECK]
generated-members=ALLGO_[A-Z_0-9]+
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment