nikitasavinov / checkstyle-action

Run Java checkstyle with reviewdog in github actions
MIT License
59 stars 37 forks source link

How to use custom checkstyle config #10

Closed nitinsh99 closed 4 years ago

nitinsh99 commented 4 years ago

Hi.. I have my custom config under following path: support/checkstyle/checkstyle.xml

I am trying following config but it is failing..

on: pull_request

jobs:
  checkstyle_job:
    runs-on: ubuntu-latest
    name: Checkstyle job
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Run check style
      uses: nikitasavinov/checkstyle-action@master
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        reporter: 'github-pr-check'
        tool_name: 'testtool'
        checkstyle_config: 'support/checkstyle/checkstyle.xml'
NKcqx commented 4 years ago

But it's already nikitasavinov/checkstyle-action@master

nitinsetter99 commented 4 years ago

But it's already nikitasavinov/checkstyle-action@master

@NKcqx so there is no way to use any other check style config other than google_checks.xml?

NKcqx commented 4 years ago

But it's already nikitasavinov/checkstyle-action@master

@NKcqx so there is no way to use any other check style config other than google_checks.xml?

I don't know, trynna figure it out too. Here's mine, I got the checkstyle.xml under project's root path:

- name: Checkout
        uses: actions/checkout@v2
      - name: Run java checkstyle
        uses: nikitasavinov/checkstyle-action@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          reporter: 'github-pr-check'
          tool_name: 'testtool'
          checkstyle_config: 'checkstyle.xml'

And got the result (already ran checkStyle locally without error): image

nikitasavinov commented 4 years ago

Hi @nitinsh99, thank you for this bug report! I will take a look soon

nikitasavinov commented 4 years ago

Should be fixed on master from now on. I will soon release 0.3.1 version with the fix.