Converts Checkstyle XML reports into GitHub Pull Request annotations for use in GitHub Actions.
cs2pr is a command-line utility that converts Checkstyle XML reports into GitHub Pull Request annotations. It solves the problem of developers having to search through GitHub Action logs to find code quality issues by displaying them directly inline in pull requests.
PHP developers and teams using GitHub Actions for CI/CD who want to integrate static analysis feedback from tools like PHPStan, Psalm, or PHP-CS-Fixer into their pull request review process.
Developers choose cs2pr because it provides a seamless way to visualize code quality issues within GitHub's native interface, eliminating the need to switch between logs and pull requests, and it supports a wide range of popular PHP analysis tools.
cs2pr - Annotate a GitHub Pull Request based on a Checkstyle XML-report within your GitHub Action
Converts Checkstyle reports into inline GitHub Pull Request annotations, eliminating log searching and reducing context switching, as highlighted in the README's philosophy.
Works seamlessly with popular PHP static analysis tools like PHPStan, Psalm, and PHP-CS-Fixer, with detailed usage examples provided for each in the README.
Accepts both existing XML files and piped output from linters, enabling easy integration into diverse CI/CD workflows, as demonstrated in the command examples.
Offers command-line flags like --colorize and --graceful-warnings to enhance readability and control build behavior, tailored for both local and GitHub environments.
Some supported tools like PHPStan and Psalm have built-in GitHub output formats, making cs2pr an unnecessary extra dependency in those cases, as the README admits.
For tools like PHP_CodeSniffer or Laravel Pint, achieving both action logs and annotations requires running the tool twice, adding steps and potential inefficiency.
Only compatible with tools outputting Checkstyle XML; for instance, PHPUnit is unsupported, forcing users to seek alternatives like phpunit-github-actions-printer.
A GitHub action to create a pull request for changes to your repository in the actions workspace
GitHub action to automatically merge pull requests that are ready
A Github Action to tag a repo on merge.
GitHub Action to automatically rebase PRs
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.