Skip to content

A tool to clean up PHPMD reports from unaltered lines.

License

Notifications You must be signed in to change notification settings

WhoTrades/phpmd-diff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phpmd-diff

phpmd-diff is a tool for creating PHPMD reports, cleared of violations unrelated to the modified lines.

Installation

composer require-dev whotrades/phpmd-diff

Usage

$ git diff HEAD^1 > /path/to/patch.txt
$ /path/to/phpmd /path/to/sources xml /path/to/rulesets.xml --reportfile report.xml
$ /path/to/phpmd-diff --path-prefix=/custom/path/prefix --filter=xml /path/to/phpmd/report.xml /path/to/patch.txt 1> /path/to/a/cleaned/report.xml