danger-php_codesniffer
Danger plugin for PHP_CodeSniffer.
Installation
$ gem install danger-php_codesniffer
Usage
Detect your PHP violations of a defined coding standard. The plugin will post a comment on PR/MR on your Github or Gitlab project.
Dangerfile:
php_codesniffer.exec
Ignore file/path and use specific coding standard:
php_codesniffer.ignore = "./vendor"
php_codesniffer.standard = "CodeIgniter"
php_codesniffer.exec
Only check new and modified file:
php_codesniffer.standard = "PSR2"
php_codesniffer.exec
Development
- Clone this repo
- Run
bundle installto setup dependencies. - Run
bundle exec rake specto run the tests. - Use
bundle exec guardto automatically have tests run as you make changes. - Make your changes.