Skip to content

cs2pr

Actions
Convert checkstyle XML to GitHub PR annotations
v1
Latest
Star (5)

annotate-pull-request-from-checkstyle-action

annotate-pull-request-from-checkstyle-action is a GitHub Action that uses cs2pr to converts checkstyle XML files to GitHub PR annotations.

Context Example Images from https://github.com/mheap/phpunit-github-actions-printer

Usage

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"

cs2pr is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Convert checkstyle XML to GitHub PR annotations
v1
Latest

cs2pr is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.