0

For our java code base, we tried to implement checkstyle github action for our needs but I couldn't figure out how to implement custom needs.

Here is the repo I want to use it. Checker

And my yml file to use it.

on: pull_request 
jobs:
  checkstyle_job:
    runs-on: ubuntu-latest
    name: Checkstyle job
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Run check style
        uses: efeozsoy/checkstyle-java-commenter@0.1.2
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          reporter: 'github-pr-check'
          tool_name: 'checkstyle-java'

This is the output of the default xml I need to change max lines and indentation rules enter image description here

Efe
  • 88
  • 1
  • 7

1 Answers1

0

You can set the config location using option checkstyle_config, in the same way as tool_name. The value can be a file in your local repository, or a link to a different configuration file. For example:

checkstyle_config: https://raw.githubusercontent.com/efeozsoy/checkstyle-java-commenter/master/custom_checker.xml
Rob Spoor
  • 6,186
  • 1
  • 19
  • 20