Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use flake8 instead of pep8 and pyflakes

  • Loading branch information...
commit 7a92d13c180a0763202f57d8b146c838e22e1e55 1 parent 927febd
@hvelarde hvelarde authored
Showing with 16 additions and 14 deletions.
  1. +10 −4 Makefile
  2. +6 −10 quality-assurance.cfg
View
14 Makefile
@@ -1,5 +1,11 @@
-# convenience makefile to boostrap & run buildout
-# use `make options=-v` to run buildout with extra options
+# convenience Makefile to run tests and QA tools
+# options: zc.buildout options
+# src: source path
+# minimum_coverage: minimun test coverage allowed
+# pep8_ignores: ignore listed PEP 8 errors and warnings
+# max_complexity: maximum McCabe complexity allowed
+# css_ignores: skip file names matching find pattern (use ! -name PATTERN)
+# js_ignores: skip file names matching find pattern (use ! -name PATTERN)
SHELL = /bin/sh
@@ -7,6 +13,7 @@ options = -N -q -t 3
src = src/collective/nitf/
minimum_coverage = 84
pep8_ignores = E501
+max_complexity = 12
css_ignores = ! -name jquery\*
js_ignores = ! -name jquery\*
@@ -26,8 +33,7 @@ jshint-install: nodejs-install
python-validation:
@echo Validating Python files
- bin/pep8 --ignore=$(pep8_ignores) $(src)
- bin/pyflakes $(src)
+ bin/flake8 --ignore=$(pep8_ignores) --max-complexity=$(max_complexity) $(src)
css-validation: ack-install csslint-install
@echo Validating CSS files
View
16 quality-assurance.cfg
@@ -1,18 +1,14 @@
[buildout]
parts +=
createzopecoverage
- pep8
- pyflakes
+ flake8
[createzopecoverage]
recipe = createzopecoverage
-[pep8]
+[flake8]
recipe = zc.recipe.egg
-eggs = pep8
-
-[pyflakes]
-recipe = zc.recipe.egg
-scripts = pyflakes
-eggs = pyflakes
-entry-points = pyflakes=pyflakes.scripts.pyflakes:main
+eggs =
+ flake8
+ ${buildout:eggs}
+entry-points = flake8=flake8.run:main
Please sign in to comment.
Something went wrong with that request. Please try again.