2017 © Pedro Peláez
 

library code-quality

Source of code quality rules for Adeira packages

image

adeira/code-quality

Source of code quality rules for Adeira packages

  • Thursday, January 19, 2017
  • by mrtnzlml
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6,911 Installations
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 2 % Grown

The README.md

Add those rules into playbook of your favorite CI server. You should create custom ruleset.xml with this content:, (*1)

<?xml version="1.0"?>
<ruleset>
    <rule ref="./vendor/adeira/code-quality/ruleset.xml"/>
</ruleset>

For Travis (similar for Gitlab-CI):, (*2)

before_script:
  - vendor/bin/parallel-lint . -e php,php3,php4,php5,phtml,phpt --exclude vendor --blame

script:
  - vendor/bin/tester tests -C
  - vendor/bin/phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp app/ src/ --ignore=bootstrap.php
  - vendor/bin/phpcs --standard=ruleset.xml --extensions=php,phpt --encoding=utf-8 --tab-width=4 -sp tests/ --ignore=*/output/*,_temp/*,bootstrap.php

Complete Travis example:, (*3)

language: php

php:
  - 7.0
  - 7.1

before_script:
  - composer selfupdate --no-progress
  - travis_retry composer install --prefer-dist
  - vendor/bin/parallel-lint . -e php,php3,php4,php5,phtml,phpt --exclude vendor --blame

script:
  - vendor/bin/tester tests -C
  - vendor/bin/phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp src/ --ignore=bootstrap.php
  - vendor/bin/phpcs --standard=ruleset.xml --extensions=php,phpt --encoding=utf-8 --tab-width=4 -sp tests/ --ignore=*/output/*,_temp/*,bootstrap.php

notifications:
  email: false

Setup your favorite editor. In my case it's PhpStorm. First setup code sniffer:, (*4)

Step 1, (*5)

And then enable and setup rules for code sniffer:, (*6)

Step 2, (*7)

The Versions

19/01 2017

dev-master

9999999-dev http://zlml.cz/

Source of code quality rules for Adeira packages

  Sources   Download

MIT

The Requires

 

02/10 2016

1.0

1.0.0.0 http://zlml.cz/

Source of code quality rules for Adeira packages

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires