Skip to content

Commit

Permalink
Add makefile for linting and cleaning
Browse files Browse the repository at this point in the history
Signed-off-by: Zack Koppert <[email protected]>
  • Loading branch information
zkoppert committed Sep 26, 2023
1 parent 75a5b46 commit 01cca50
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[MAIN]
ignore=.git,
__pycache__,
venv,
.venv,


[MESSAGES CONTROL]
disable=
redefined-argument-from-local,
too-many-arguments,
too-few-public-methods,
duplicate-code,
too-many-locals,
too-many-branches,
line-too-long,
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.PHONY: test
test:
pytest -v --cov=. --cov-config=.coveragerc --cov-fail-under=80 --cov-report term-missing

.PHONY: clean
clean:
rm -rf .pytest_cache .coverage __pycache__

.PHONY: lint
lint:
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=venv,.venv,.git,__pycache__
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=15 --max-line-length=127 --statistics --exclude=venv,.venv,.git,__pycache__
pylint --rcfile=.pylintrc --fail-under=9.0 *.py

0 comments on commit 01cca50

Please sign in to comment.