-
Notifications
You must be signed in to change notification settings - Fork 1
/
qa.cfg
92 lines (76 loc) · 2.02 KB
/
qa.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
[buildout]
package-min-coverage = 80
parts +=
code-analysis
coverage-sh
createcoverage
[code-analysis]
recipe = plone.recipe.codeanalysis[recommended]
check-manifest = True
clean-lines = True
csslint = True
csslint-bin = ${buildout:bin-directory}/csslint
deprecated-aliases = True
directory = ${buildout:directory}/src
find-untranslated = True
flake8 = True
flake8-extensions =
flake8-blind-except
flake8-coding
flake8-debugger
flake8-deprecated
flake8-isort
flake8-pep3101
flake8-plone-api
flake8-plone-hasattr
flake8-print
flake8-quotes
flake8-string-format
flake8-todo
flake8-ignore = E501
flake8-max-complexity = 12
i18ndude-bin = ${buildout:bin-directory}/i18ndude
jshint = True
jshint-bin = ${buildout:bin-directory}/jshint
pep3101 = True
pre-commit-hook = True
return-status-codes = True
zptlint = True
zptlint-bin = ${buildout:bin-directory}/zptlint
[coverage-sh]
recipe = collective.recipe.template
output = ${buildout:directory}/bin/coverage.sh
mode = 755
input = inline:
#! /bin/sh
# checks for report created with createcoverage and evaluate the result
DEFAULT=${buildout:package-min-coverage}
REPORT="htmlcov/index.html"
if [ "$#" -eq 1 ] && [ $1 -ge 0 ] && [ $1 -le 100 ]; then
MINIMUM=$1
else
echo "Invalid value for minimum coverage; using default: $DEFAULT%"
MINIMUM=$DEFAULT
fi
if [ ! -f "$REPORT" ]; then
bin/createcoverage run bin/test
fi
# find first percentage value in file (module test coverage) and return it
COVERAGE=`grep "[0-9]\{1,3\}[%]" $REPORT -m 1 -o | grep "[0-9]\{1,3\}" -o`
if [ $COVERAGE -lt $MINIMUM ]; then
echo "Insufficient test coverage: $COVERAGE% (minimum acceptable is $MINIMUM%)"
exit 1
else
echo "Current test coverage: $COVERAGE%"
exit 0
fi
[createcoverage]
recipe = zc.recipe.egg
eggs = createcoverage
[node]
recipe = gp.recipe.node
npms = csslint jshint
scripts = csslint jshint
[zptlint]
recipe = zc.recipe.egg
eggs = zptlint