Skip to content

staabm/annotate-pull-request-from-checkstyle-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"