-
Notifications
You must be signed in to change notification settings - Fork 57
/
.phpqa.yml
140 lines (126 loc) · 5.65 KB
/
.phpqa.yml
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
phpqa:
# default CLI options - https://github.com/EdgedesignCZ/phpqa#analyze
# can be overriden by CLI: phpqa --tools phpcs:1
analyzedDirs: ./
buildDir: build/
ignoredDirs: vendor
ignoredFiles: ""
report: false
execution: parallel
output: file
tools: phpmetrics,phploc,phpcs,php-cs-fixer,phpmd,pdepend,phpcpd,phpstan,phpunit,psalm,security-checker,parallel-lint,deptrac
# array definition and allowed errors count is supported too
# tools: [phploc, phpcs:0]
verbose: false
# Other config
# Php file extensions to parse.
extensions:
- php
phpcs:
# alternatively you can use an array to define multiple standards (https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage#specifying-a-coding-standard)
standard: PSR2
# number of allowed errors is compared with warnings+errors, or just errors from checkstyle.xml
ignoreWarnings: false
# https://github.com/squizlabs/PHP_CodeSniffer/wiki/Reporting
reports:
cli:
- full
file:
# checkstyle is always included and overriden
checkstyle: checkstyle.xml
# you can include custom reports (https://github.com/wikidi/codesniffer/blob/master/reports/wikidi/Summary.php#L39)
# ./vendor/owner/package/src/MySummaryReport.php: phpcs-summary.html
php-cs-fixer:
# http://cs.sensiolabs.org/#usage
rules: '@PSR2'
allowRiskyRules: false
# by default the tool is runned in dry-run mode (no fixers are applied)
isDryRun: true
# alternatively you can define path to your .phpcs_file (rules/allowRiskyRules config is ignored)
config: null
phpmd:
# alternatively you can use an array to define multiple rule sets (https://phpmd.org/documentation/index.html#using-multiple-rule-sets)
standard: app/phpmd.xml
ignoreParsingErrors: true
pdepend:
# coverageReport: build/coverage-clover.xml
phpcpd:
minLines: 5
minTokens: 70
phpmetrics:
# v1
config: null
# v2
git: false
# junit: build/log-junit.xml
# composer: composer.json
phpstan:
level: 0
# https://github.com/phpstan/phpstan/issues/1880
memoryLimit: null
# https://github.com/phpstan/phpstan#configuration
# standard: tests/.ci/phpstan.neon
phpunit:
# binary: vendor/bin/phpunit
binary: null
# phpunit.xml
config: null
reports:
file: []
# log: [junit, tap, json]
# testdox: [html, text]
# coverage: [html, clover, crap4j, php, text, xml] # requires XDebug extension
psalm:
config: app/psalm.xml
deadCode: false
threads: 1
showInfo: true
# no memory limit = using ini defaults (https://github.com/EdgedesignCZ/phpqa/issues/144
memoryLimit: null
deptrac:
depfile: null # depfile.yml (https://github.com/qossmic/deptrac#the-depfile)
security-checker:
composerLock: null # use it if composer.lock is not in current working directory or analyzed directory
# paths are relative to .phpqa.yml, so don't copy-paste this section if you don't have custom templates
report:
phploc: app/report/phploc.xsl
phpcpd: app/report/phpcpd.xsl
phpcs: app/report/phpcs.xsl
pdepend: app/report/pdepend.xsl
phpmd: app/report/phpmd.xsl
php-cs-fixer: app/report/php-cs-fixer.xsl
psalm: app/report/psalm.xsl
phpstan: app/report/phpstan.xsl
assets:
bootstrap.min.css: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css
jquery.min.js: https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js
bootstrap.min.js: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js
prism.min.css: https://cdnjs.cloudflare.com/ajax/libs/prism/1.5.1/themes/prism.min.css
prism.js: https://cdnjs.cloudflare.com/ajax/libs/prism/1.5.1/prism.js
prism-php.min.js: https://cdnjs.cloudflare.com/ajax/libs/prism/1.5.1/components/prism-php.min.js
jquery.dataTables.min.js: https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js
dataTables.bootstrap.min.js: https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js
dataTables.responsive.min.js: https://cdn.datatables.net/responsive/2.1.0/js/dataTables.responsive.min.js
responsive.bootstrap.min.js: https://cdn.datatables.net/responsive/2.1.0/js/responsive.bootstrap.min.js
dataTables.bootstrap.min.css: https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css
responsive.bootstrap.min.css: https://cdn.datatables.net/responsive/2.1.0/css/responsive.bootstrap.min.css
selectize.min.js: https://cdn.jsdelivr.net/selectize/0.12.3/js/standalone/selectize.min.js
selectize.bootstrap3.css: https://cdn.jsdelivr.net/selectize/0.12.3/css/selectize.bootstrap3.css
ansi_up.js: https://edgedesigncz.github.io/phpqa/assets/ansi_up.js
# !!! EXPERIMENTAL !!!
# Beware that configuration or \Edge\QA\Tools\Tool might change (especially $SETTINGS is not stable :)
# Use it for development of new tools, but not on production (you can add just a new tool, don't have to define all tools).
tool:
phpmetrics: [Edge\QA\Tools\Analyzer\PhpMetrics, Edge\QA\Tools\Analyzer\PhpMetricsV2]
phploc: Edge\QA\Tools\Analyzer\Phploc
phpcs: Edge\QA\Tools\Analyzer\Phpcs
php-cs-fixer: Edge\QA\Tools\Analyzer\PhpCsFixer
phpmd: Edge\QA\Tools\Analyzer\Phpmd
pdepend: Edge\QA\Tools\Analyzer\Pdepend
phpcpd: Edge\QA\Tools\Analyzer\Phpcpd
parallel-lint: Edge\QA\Tools\Analyzer\ParallelLint
phpstan: Edge\QA\Tools\Analyzer\Phpstan
phpunit: Edge\QA\Tools\Analyzer\Phpunit
psalm: Edge\QA\Tools\Analyzer\Psalm
security-checker: Edge\QA\Tools\Analyzer\SecurityChecker
deptrac: Edge\QA\Tools\Analyzer\Deptrac