remy-theroux / quality-checker
Gonna check quality of your PHP project
Installs: 4 488
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- doctrine/collections: ^1.3
- monolog/monolog: ^1.11
- symfony/config: ^2.7
- symfony/console: ^2.6
- symfony/dependency-injection: ^2.7
- symfony/event-dispatcher: ^2.7
- symfony/expression-language: ^2.7
- symfony/process: ^2.7
- symfony/yaml: ^2.7.5
Requires (Dev)
- escapestudios/symfony2-coding-standard: ^2.0
- iadvize/php-convention: dev-master
- mockery/mockery: ^0.9.4
- phpmd/phpmd: ^2.3
- phpspec/phpspec: ^2.3
- phpunit/phpunit: ^5.0
- squizlabs/php_codesniffer: ^2.0
README
A PHP command line quality tools. It lets you check your code quality with a single yaml file. Supported tools are :
- PHP code sniffer - PHPCS
- PHP mess detector - PHPMD
- PHP unit - PHPUNIT
- PHP spec - PHPSPEC
- ... many more are coming
Installing
$ composer require --dev remy-theroux/quality-checker
You must require each tool you want to use in your own project. Binaries will be executed from your vendor/bin directory.
Configuring
$ mv vendor/remy-theroux/quality-checker/.qualitychecker.yml.dist .qualitychecker.yml
Full configuration of tasks is available here
parameters: tasks: [phpcs, phpmd] # PHPCS configuration phpcs: # Could be PEAR, PHPCS, PSR1, PSR2, Squiz, Zend or a directory with a ruleset './vendor/iadvize/php-convention/phpcs/Iadvize' standard: PSR2 paths: [./src] show_warnings: true tab_width: 2 ignore_patterns: [] sniffs: [] timeout: 180 # PHPMD configuration phpmd: paths: [./src/] format: text rulesets: [cleancode, codesize, controversial, design, naming, unusedcode] suffixes: [php] timeout: 180 # PHPUNIT configuration, only use phpunit.xml configuration file phpunit: timeout: 180 # PHPSPEC configuration, only use a yml configuration file, file name can be configured phpspec: config: ./path/to/config/phpspec.yml (default to .phpspec.yml) verbose: true quiet: true timeout: 180
Running
Start all configured tasks, a status code 0 is returned if all tasks are successfull else -1 is returned. Quality checker is searching for .qualitychecker.yml at current location.
$ ./vendor/bin/qualitychecker
Contact
Feel free to contact us on github for improvment, bugs or simply to hug us.
TODO
- Add logs during execution
- Add BEHAT support