2017 © Pedro PelĂĄez
 

project quality-checker

Gonna check quality of your PHP project

image

remy-theroux/quality-checker

Gonna check quality of your PHP project

  • Tuesday, May 10, 2016
  • by theror
  • Repository
  • 1 Watchers
  • 5 Stars
  • 4,324 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

Quality checker Travis CI status

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, (*1)

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., (*2)

Configuring

$ mv vendor/remy-theroux/quality-checker/.qualitychecker.yml.dist .qualitychecker.yml

Full configuration of tasks is available here, (*3)

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., (*4)

$ ./vendor/bin/qualitychecker

Contact

Feel free to contact us on github for improvment, bugs or simply to hug us., (*5)

TODO

  • Add logs during execution
  • Add BEHAT support

The Versions