Runs PHP Code Sniffer against your build.
Simple example where PHPCS will run on app directory, but ignore the views folder, and use PSR-1 and PSR-2 rules for validation:
test: php_code_sniffer: path: "app" ignore: - "app/views" standard: "PSR1,PSR2"
For use with an existing project:
test: php_code_sniffer: standard: "/phpcs.xml" # The leading slash is needed to trigger an external ruleset. # Without it, PHPCI looks for a rule named "phpcs.xml" allowed_errors: -1 # Even a single error will cause the build to fail. -1 = unlimited allowed_warnings: -1
You can edit this page on Github. Your changes will appear on this site within 15 minutes.