6
0
Просмотр исходного кода

added a Makefile and converagerc file

Dimitri Korsch 3 лет назад
Родитель
Сommit
3cdd0a517f
4 измененных файлов с 36 добавлено и 0 удалено
  1. 19 0
      .coveragerc
  2. 1 0
      .gitignore
  3. 14 0
      Makefile
  4. 2 0
      requirements.dev.txt

+ 19 - 0
.coveragerc

@@ -0,0 +1,19 @@
+[run]
+source = pycs
+
+[report]
+
+# Regexes for lines to exclude from consideration
+exclude_lines =
+	# Have to re-enable the standard pragma
+	pragma: no cover
+
+	# Don't complain if tests don't hit defensive assertion code:
+	raise AssertionError
+	raise NotImplementedError
+	pass
+
+	# Don't complain if non-runnable code isn't run:
+	if 0:
+	if __name__ == .__main__.:
+

+ 1 - 0
.gitignore

@@ -31,6 +31,7 @@ __pycache__/
 
 # coverage
 .coverage
+htmlcov/
 
 # projects and models
 /projects/

+ 14 - 0
Makefile

@@ -9,3 +9,17 @@ install:
 
 run_tests:
 	python -m unittest discover test/
+
+run_coverage:
+	@coverage run --source=pycs/ -m unittest discover test/
+	coverage html
+	coverage report -m
+
+run_pylint:
+	pylint --fail-under=9.5 \
+         --disable=duplicate-code \
+         --disable=missing-module-docstring \
+         --disable=too-many-instance-attributes \
+         --extension-pkg-whitelist=cv2 \
+         --module-rgx='^[A-Za-z0-9]+$' --class-rgx='^[A-Za-z0-9]+$' \
+         app.py pycs

+ 2 - 0
requirements.dev.txt

@@ -0,0 +1,2 @@
+coverage
+pylint