Code quality

* Create a makefile (for *nix only, right?)
* Configure code coverage and tests
* Configure linter
* Configure linter for errors only
This commit is contained in:
Fred Pauchet 2021-05-19 20:58:25 +02:00 committed by Fred
parent fa6c6d531a
commit 66735a49e3
2 changed files with 28 additions and 0 deletions

13
Makefile Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
.PHONY: coverage errors
coverage:
cd src/; coverage run --source='.' manage.py test; coverage report -m; cd ..
@echo "Testing of coverage in the sources finished."
lint:
pylint src/* --disable=django-not-configured
errors:
pylint src/* --errors-only --disable=django-not-configured

15
src/.coveragerc Normal file
View File

@ -0,0 +1,15 @@
[run]
branch = true
omit =
*/tests/*
*/test*
*/migrations/*
*/urls.py
*/settings/*
*/wsgi.py
*/__init__.py
manage.py
source = .
[report]
show_missing = true