covex-nn/phpqatools

Composer package for PHP QA Tools

2.0.1 2016-07-13 13:52 UTC

README

68747470733a2f2f7472617669732d63692e6f72

Contents (Phar files)

  • PHPUnit v4.8.26
  • PHP_CodeSniffer v2.6.1
  • phpDocumentor v2.8.5
  • PHPMD v2.4.3
  • phpcpd v2.0.4
  • phploc v3.0.1
  • PDepend v2.2.4
  • PHP CodeBrowser

Installation

{
  "require-dev" : {
    "covex-nn/phpqatools" : "~2.0"
  }
}

Usage

<?xml version="1.0" encoding="utf-8"?>
<project name="Your project name" default="init">
  <target name="init">
    <echo message="${ant.project.name} Init - OK" />
  </target>
</project>
  • Use this template for build-dev.xml
<?xml version="1.0" encoding="utf-8"?>
<project name="Your project name - PHP QA Tools" default="init">
  <import file="build.xml" />
  <import file="vendor/covex-nn/phpqatools/build.xml" />
</project>
  • Write code, create unit-tests
  • Run ant init
  • Run ant -f build-dev.xml CI-build

To skip one ore more QA tools set appropriate ant property to 1:

  • CI.no-pdepend
  • CI.no-phpmd
  • CI.no-phpcpd
  • CI.no-phpcs
  • CI.no-phploc
  • CI.no-phpunit
  • CI.no-phpcb
  • CI.no-phpdoc

To fail or to ignore ant job if CI tool return non-zero result set appropriate ant property to true or to false:

  • CI.failonerror-phpunit (default value: true)
  • CI.failonerror-pdepend (default value: false)
  • CI.failonerror-phpmd (default value: false)
  • CI.failonerror-phpcpd (default value: false)
  • CI.failonerror-phpcs (default value: false)
  • CI.failonerror-phploc (default value: false)
  • CI.failonerror-phpcb (default value: false)
  • CI.failonerror-phpdoc (default value: false)