mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
composer > squizlabs/php_codesniffer package > use ^3.4 (instead of ^2.9)
This commit is contained in:
@@ -47,6 +47,7 @@ dir.tests = ${project.basedir}/tests
|
||||
dir.build = ${project.basedir}/build
|
||||
dir.reports = ${dir.build}/reports
|
||||
dir.reports.coverage = ${dir.reports}/phpunit-coverage
|
||||
dir.reports.code_sniffer = ${dir.reports}/code_sniffer
|
||||
|
||||
# Data directories
|
||||
#
|
||||
@@ -72,6 +73,10 @@ check.php_coveralls.command = ./vendor/bin/php-coveralls --ansi -v
|
||||
#
|
||||
tests.cs_fixer.command = ./vendor/bin/php-cs-fixer fix --verbose
|
||||
|
||||
# Path of the PHP_CodeSniffer (https://github.com/squizlabs/PHP_CodeSniffer)
|
||||
#
|
||||
tests.code_sniffer.command = ./vendor/bin/phpcs --report-full=${dir.reports.code_sniffer}/full.txt --report-summary=${dir.reports.code_sniffer}/summary.txt --report-checkstyle=${dir.reports.code_sniffer}/checkstyle.xml
|
||||
|
||||
# Test database path
|
||||
#
|
||||
tests.database = ${dir.data.temporary}/database.sqlite
|
||||
|
||||
@@ -55,14 +55,9 @@
|
||||
test:infection"
|
||||
/>
|
||||
|
||||
<!-- Symfony2 code sniffer -->
|
||||
<!-- PHP_CodeSniffer -->
|
||||
<target name="check:cs" depends="build:prepare">
|
||||
<phpcodesniffer standard="PSR2" showWarnings="true">
|
||||
<fileset refid="sourcecode"/>
|
||||
<formatter type="checkstyle" outfile="${dir.reports}/checkstyle.xml"/>
|
||||
<formatter type="csv" outfile="${dir.reports}/checkstyle.csv"/>
|
||||
<formatter type="summary" outfile="${dir.reports}/checkstyle-summary.txt"/>
|
||||
</phpcodesniffer>
|
||||
<exec command="${tests.code_sniffer.command}" passthru="true"/>
|
||||
</target>
|
||||
|
||||
<!-- copy/paste detector -->
|
||||
@@ -112,6 +107,7 @@
|
||||
<target name="build:prepare" depends="build:clean">
|
||||
<mkdir dir="${dir.reports}"/>
|
||||
<mkdir dir="${dir.reports.coverage}"/>
|
||||
<mkdir dir="${dir.reports.code_sniffer}"/>
|
||||
</target>
|
||||
|
||||
<!-- Checkout and finalization -->
|
||||
|
||||
Reference in New Issue
Block a user