mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-18 20:47:54 +00:00
Only run codechecks on changed Python source files
This commit is contained in:
parent
dc611bf9b2
commit
38dd0d1b70
@ -1,9 +1,10 @@
|
||||
repos:
|
||||
- repo: local
|
||||
- repo: "local"
|
||||
hooks:
|
||||
- id: codechecks
|
||||
name: codechecks
|
||||
- id: "codechecks"
|
||||
name: "codechecks"
|
||||
stages: ["push"]
|
||||
language: "system"
|
||||
files: ".py$"
|
||||
entry: "tox -e codechecks"
|
||||
language: system
|
||||
pass_filenames: false
|
||||
pass_filenames: true
|
||||
|
14
tox.ini
14
tox.ini
@ -95,12 +95,16 @@ setenv =
|
||||
# .decode(getattr(sys.stdout, "encoding", "utf8"))
|
||||
# `TypeError: decode() argument 1 must be string, not None`
|
||||
PYTHONIOENCODING=utf_8
|
||||
|
||||
# If no positional arguments are given, try to run the checks on the
|
||||
# entire codebase, including various pieces of supporting code.
|
||||
DEFAULT_FILES="src integration static misc setup.py"
|
||||
commands =
|
||||
flake8 src integration static misc setup.py
|
||||
python misc/coding_tools/check-umids.py src
|
||||
python misc/coding_tools/check-debugging.py
|
||||
python misc/coding_tools/find-trailing-spaces.py -r src static misc setup.py
|
||||
python misc/coding_tools/check-miscaptures.py
|
||||
flake8 {posargs:{env:DEFAULT_FILES}}
|
||||
python misc/coding_tools/check-umids.py {posargs:{env:DEFAULT_FILES}}
|
||||
python misc/coding_tools/check-debugging.py {posargs:{env:DEFAULT_FILES}}
|
||||
python misc/coding_tools/find-trailing-spaces.py -r {posargs:{env:DEFAULT_FILES}}
|
||||
python misc/coding_tools/check-miscaptures.py {posargs:{env:DEFAULT_FILES}}
|
||||
|
||||
# If towncrier.check fails, you forgot to add a towncrier news
|
||||
# fragment explaining the change in this branch. Create one at
|
||||
|
Loading…
Reference in New Issue
Block a user