2017 © Pedro Peláez
 

library phpqa-patch

**phpqa** is a command-line tool for PHPMD, PHPCS and PHPCPD.

image

rodrigorm/phpqa-patch

**phpqa** is a command-line tool for PHPMD, PHPCS and PHPCPD.

  • Friday, December 30, 2016
  • by rodrigorm
  • Repository
  • 1 Watchers
  • 1 Stars
  • 285 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 3 % Grown

The README.md

phpqa

Build Status, (*1)

phpqa is a command-line tool for PHPMD, PHPCS and PHPCPD., (*2)

Installation

Composer

composer require 'rodrigorm/phpqa-patch=*'

For a system-wide installation via Composer, you can run:, (*3)

composer global require 'rodrigorm/phpqa-patch=*'

Make sure you have ~/.composer/vendor/bin/ in your path., (*4)

Usage

Patch PHPMD

$ git diff HEAD^1 > /tmp/patch.txt

$ phpmd /path/to/project/Example.php xml phpmd.xml --reportfile /tmp/pmd.xml

$ phpqa patch-pmd --patch /tmp/patch.txt         \
                  --path-prefix /path/to/project \
                  /tmp/pmd.xml
phpqa dev-master by Rodrigo Moyle.

1 violations found:

Example.php:11     Lorem ipsum dolor sit amet.

Patch PHPCPD

$ git diff HEAD^1 > /tmp/patch.txt

$ phpcpd --log-pmd /tmp/pmd-cpd.xml /path/to/project/

$ phpqa patch-cpd --patch /tmp/patch.txt         \
                  --path-prefix /path/to/project \
                  /tmp/pmd-cpd.xml
phpqa dev-master by Rodrigo Moyle.

1 clones found:

  -     /tmp/Example.php:11-11
  -     /tmp/Example1.php:26-26

Patch PHPCS

$ git diff HEAD^1 > /tmp/patch.txt

$ phpcs --report=checkstyle -report-file="/tmp/checkstyle.xml" --standard="phpcs.xml" /path/to/project/

$ phpqa patch-cs --patch /tmp/patch.txt         \
                 --path-prefix /path/to/project \
                 /tmp/checkstyle.xml
phpqa dev-master by Rodrigo Moyle.

1 errors found:

Example.php:11 - ERROR: Lorem ipsum dolor sit amet.

The Versions

30/12 2016

dev-master

9999999-dev

**phpqa** is a command-line tool for PHPMD, PHPCS and PHPCPD.

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires