pylint excludes updated; zptlint added.

svn path=/plone.app.discussion/trunk/; revision=39306
This commit is contained in:
Timo Stollenwerk 2010-08-28 18:21:54 +00:00
parent 42cad90262
commit f110dd6c40
1 changed files with 41 additions and 3 deletions

View File

@ -13,6 +13,8 @@ parts +=
jscoverage
pylint
pylint-test
zptlint
zptlint-test
[versions]
zope.schema = 3.6.0
@ -62,7 +64,7 @@ arguments = [
'--output-format=parseable',
'--zope=y',
'--reports=y',
'--disable-msg=E0611,F0401,W0232,E1101,C0103,C0111,R0201,W0201,R0911,E1102,E1121,R0904,F0220,E1103,R0901',
'--disable-msg=E0611,F0401,W0232,E1101,C0103,C0111,R0201,W0201,R0911,R0904,F0220,E1103,R0901,E0211,E0213,E1002',
'--generated-members=objects',
] + sys.argv[1:]
@ -76,6 +78,13 @@ arguments = [
# R0201: Method could be a function
# W0201: Attribute %r defined outside __init__
# R0911: Too many return statements (%s/%s)
# E0211: Method has no argument
# - Reason: raises an error on zope.interface definitions
# E0213 Method should have "self" as first argument
# - Reason: raises an error on zope.interface definitions
# E1002 Use super on an old style class
# - Reason: super(CommentsViewlet, self).update() raises an error
# ...
# See http://pylint-messages.wikidot.com/all-messages for a full list.
@ -83,9 +92,38 @@ arguments = [
recipe = collective.recipe.template
input = inline:
#!/bin/sh
rm pylint.out
rm pylint.log
echo "Running pylint"
find -L plone/app/discussion/ -regex ".*\.[c]?py" | xargs bin/pylint >> pylint.out
find -L plone/app/discussion/ -regex ".*\.[c]?py" | xargs bin/pylint >> pylint.log
echo "finish"
output = ${buildout:directory}/bin/pylint-test
mode = 755
[zptlint]
recipe = zc.recipe.egg
eggs =
zptlint
entry-points = zptlint=zptlint:run
[zptlint-test]
recipe = collective.recipe.template
input = inline:
#!/bin/sh
if [ -e zptlint.log ]; then
echo "Removing existing zptlint.log file"
rm zptlint.log
fi
echo "Running zptlint-test"
TMPL=$(find plone/app/discussion -regex ".*\.[c|z]?pt")
echo "Checking"
echo $TMPL"
find plone/app/discussion -regex ".*\.[c|z]?pt" | xargs bin/zptlint > zptlint.log
if [ -s zptlint.log ]; then
echo "Errors were found, see zptlint.log for details"
else
echo "No errors found"
rm zptlint.log
fi
output = ${buildout:directory}/bin/zptlint-test
mode = 755