Skip to content

Commit 01cca50

Browse files
committed
Add makefile for linting and cleaning
Signed-off-by: Zack Koppert <[email protected]>
1 parent 75a5b46 commit 01cca50

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.pylintrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[MAIN]
2+
ignore=.git,
3+
__pycache__,
4+
venv,
5+
.venv,
6+
7+
8+
[MESSAGES CONTROL]
9+
disable=
10+
redefined-argument-from-local,
11+
too-many-arguments,
12+
too-few-public-methods,
13+
duplicate-code,
14+
too-many-locals,
15+
too-many-branches,
16+
line-too-long,

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.PHONY: test
2+
test:
3+
pytest -v --cov=. --cov-config=.coveragerc --cov-fail-under=80 --cov-report term-missing
4+
5+
.PHONY: clean
6+
clean:
7+
rm -rf .pytest_cache .coverage __pycache__
8+
9+
.PHONY: lint
10+
lint:
11+
# stop the build if there are Python syntax errors or undefined names
12+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=venv,.venv,.git,__pycache__
13+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
14+
flake8 . --count --exit-zero --max-complexity=15 --max-line-length=127 --statistics --exclude=venv,.venv,.git,__pycache__
15+
pylint --rcfile=.pylintrc --fail-under=9.0 *.py

0 commit comments

Comments
 (0)