https://github.com/staabm/annotate-pull-request-from-checkstyle-action
cs2pr GitHub Action
https://github.com/staabm/annotate-pull-request-from-checkstyle-action
Last synced: about 1 year ago
JSON representation
cs2pr GitHub Action
- Host: GitHub
- URL: https://github.com/staabm/annotate-pull-request-from-checkstyle-action
- Owner: staabm
- License: mit
- Created: 2023-08-21T07:26:29.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-30T10:41:56.000Z (almost 3 years ago)
- Last Synced: 2025-06-08T15:28:36.910Z (about 1 year ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# annotate-pull-request-from-checkstyle-action
annotate-pull-request-from-checkstyle-action is a GitHub Action that uses [cs2pr](https://github.com/staabm/annotate-pull-request-from-checkstyle) to converts checkstyle XML files to GitHub PR annotations.

_Images from https://github.com/mheap/phpunit-github-actions-printer_
## Usage
```yml
name: CS2PR
on:
- pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: staabm/annotate-pull-request-from-checkstyle-action@v1
with:
files: checkstyle.xml
notices-as-warnings: true # optional
```
### Action Inputs
- **files** _(Required)_ - The checkstyle XML files to convert to GitHub PR annotations separated by semicolons
- **graceful-warnings** _(Optional)_ - Don't exit with error codes if there are only warnings
- Expected value: "true"
- **colorize** _(Optional)_ - Colorize the output (still compatible with Github Annotations)
- Expected value: "true"
- **notices-as-warnings** _(Optional)_ - Convert notices to warnings (Github does not annotate notices otherwise)
- Expected value: "true"
- **errors-as-warnings:** _(Optional)_ - Downgrade errors to warnings
- Expected value: "true"
- **prepend-filename** _(Optional)_ - Prepend error 'filename' attribute to the message
- Expected value: "true"
- **prepend-source** _(Optional)_ - Prepend error 'source' attribute to the message
- Expected value: "true"