Permalink
Browse files

use flake8 instead of pep8 and pyflakes

  • Loading branch information...
1 parent 833fe96 commit 47277707914878749c2d3ef9c7f3f07ead5bcc75 @hvelarde hvelarde committed Dec 19, 2012
Showing with 18 additions and 16 deletions.
  1. +12 −6 Makefile
  2. +6 −10 quality-assurance.cfg
View
18 Makefile
@@ -1,14 +1,21 @@
-# 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
options = -N -q -t 3
src = src/collective/upload/
minimum_coverage = 69
pep8_ignores = E501
-css_ignores = ! -name bootstrap\* ! -name jquery\*
-js_ignores = ! -name bootstrap\* ! -name jquery\*
+max_complexity = 12
+css_ignores = ! -name jquery\*
+js_ignores = ! -name jquery\*
ack-install:
sudo apt-get install ack-grep
@@ -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

0 comments on commit 4727770

Please sign in to comment.