Add pylint pre-commit hook
Change-Id: Id933664460ef15dc2c8a968309de232626aeb5b9
This commit is contained in:
parent
7b22fc3468
commit
c1378755b1
@ -34,6 +34,15 @@ repos:
|
||||
pass_filenames: false
|
||||
# args: [--ignore-missing-imports]
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: pylint
|
||||
files: ^tobiko/
|
||||
name: pylint
|
||||
entry: pylint -j0 --max-line-length=80 -E -e W,E -d unused-import,broad-except,fixme
|
||||
language: system
|
||||
types: [python]
|
||||
|
||||
|
||||
# - repo: https://github.com/adrienverge/yamllint.git
|
||||
# rev: v1.23.0
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
ansible-lint==4.2.0 # MIT
|
||||
pre-commit >= 2.6.0 # MIT
|
||||
pylint>=2.5.2 # GPLv2
|
||||
pylint>=2.5.2 # GPLv2
|
||||
|
6
tox.ini
6
tox.ini
@ -93,8 +93,7 @@ basepython = {[testenv:pep8]basepython}
|
||||
deps = {[testenv:pep8]deps}
|
||||
envdir = {toxworkdir}/pep8
|
||||
commands =
|
||||
pylint -j0 --max-line-length=80 -E -e W,E \
|
||||
-d unused-import,broad-except,fixme tobiko
|
||||
pre-commit run -a pylint
|
||||
|
||||
|
||||
[testenv:linters]
|
||||
@ -112,8 +111,6 @@ commands =
|
||||
xargs -t -n1 -P 16 ansible-lint -xANSIBLE0012'
|
||||
bash -c 'find playbooks infrared_plugin -maxdepth 2 -type f -regex '.*.y[a]ml' | \
|
||||
xargs -t -n1 -P 16 ansible-lint -xANSIBLE0012'
|
||||
pylint -j0 --max-line-length=80 -E -e W,E \
|
||||
-d unused-import,broad-except,fixme tobiko
|
||||
|
||||
|
||||
[flake8]
|
||||
@ -130,6 +127,7 @@ application-import-names = tobiko
|
||||
max-complexity = 10
|
||||
import-order-style = pep8
|
||||
|
||||
|
||||
# --- integration test environments ------------------------------------------
|
||||
|
||||
[integration]
|
||||
|
Loading…
x
Reference in New Issue
Block a user