Enable PHP CodeSniffer in travis testing

This commit is contained in:
Markus Frosch 2017-09-17 09:25:13 +02:00 committed by Eric Lippmann
parent cc4fcaefad
commit 3412fdfac1
2 changed files with 24 additions and 2 deletions

View File

@ -42,6 +42,5 @@ before_script:
script:
# also see: modules/test/application/clicommands/PhpCommand.php
# phpcs is disabled until fixed...
# - php phpcs.phar -p --standard=icingaweb2.ruleset.xml --extensions=php --encoding=utf-8 application/ library/Icinga modules/ test/
- php phpcs.phar
- php phpunit.phar -c modules/test/phpunit.xml --verbose

23
phpcs.xml Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0"?>
<ruleset name="PHP_CodeSniffer">
<description>Sniff our code a while</description>
<file>application/</file>
<file>library/Icinga</file>
<file>modules/</file>
<file>test/</file>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>application/fonts/fontello-ifont/*</exclude-pattern>
<arg value="wps"/>
<arg name="colors"/>
<arg name="report-width" value="auto"/>
<arg name="report-full"/>
<arg name="report-gitblame"/>
<arg name="report-summary"/>
<arg name="encoding" value="UTF-8"/>
<arg name="extensions" value="php"/>
<rule ref="icingaweb2.ruleset.xml" />
</ruleset>