Download the PHP package mridang/cpd-annotations without Composer
On this page you can find all versions of the php package mridang/cpd-annotations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mridang/cpd-annotations
More information about mridang/cpd-annotations
Files in mridang/cpd-annotations
Package cpd-annotations
Short Description Turns CPD style XML reports into Github pull-request annotations via the Checks API. This script is meant for use within your Github Action.
License MIT
Informations about the package cpd-annotations
Annotate pull-requests based on a CPD XML-report
Turns CPD style XML-reports into Github pull-request annotations via the Checks API. This script is meant for use within your Github Action.
That means you no longer have to search through your Github Action log files or the console output. No need to interpret messages which are formatted differently with every tool. Instead you can focus on your pull-request, and you don't need to leave the pull-request area.
Images from https://github.com/mheap/phpunit-github-actions-printer
Installation
Install the binary via Composer
Example Usage
cpd2pr
can be used on a already existing CPD-report XML-report. Alternatively you might use it in the UNIX pipe notation to chain it into your existing cli command.
Run one of the following commands within your Github Action workflow:
Process a CPD formatted file
Available Options
--graceful-warnings
: Don't exit with error codes if there are only warnings--colorize
: Colorize the output. Useful if the same lint script should be used locally on the command line and remote on Github Actions. With this option, errors and warnings are better distinguishable on the command line and the output is still compatible with Github annotations
Pipe the output of another commmand
This works for any command which produces a CPD-formatted report. Examples can bee seen below:
Using PHCPD
Example GithubAction workflow
If you're using shivammathur/setup-php
to setup PHP, cpd2pr
binary is shipped within:
If you use a custom PHP installation, then your project needs to require mridang/cpd-annotations
Resources
All versions of cpd-annotations with dependencies
ext-simplexml Version *