nikitasavinov / checkstyle-action

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

Filter mode not considered valid input #13

Closed phrdang closed 4 years ago

phrdang commented 4 years ago

Hi, thanks for making this action, I've found it very useful! I have a question about the filter_mode option, though.

I tried adding it to a workflow, but every time I try running it, it gives me this error:

Screen Shot 2020-07-08 at 1 31 18 AM

This is my workflow code right now:

name: Java

on: pull_request

jobs:
  lint-java:
    name: Lint Java with checkstyle
    runs-on: ubuntu-latest

    steps:
    - name: Check out Git repository
      uses: actions/checkout@v2

    - name: Setup Java JDK
      uses: actions/setup-java@v1.3.0
      with:
        java-version: '12.x'

    - name: Run checkstyle with reviewdog
      uses: nikitasavinov/checkstyle-action@0.2.0
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        reporter: github-pr-review
        filter_mode: nofilter  # not working

        # use modified google checks
        # (so that tab width is 4 instead of 2)
        # checkstyle_config: google_checks_mod.xml  # not working

Is there something I'm doing wrong, or is there a bug? If the latter, a fix would be greatly appreciated!

(As you can see, I also tried using the checkstyle_config option with a custom checkstyle configuration file, but it kept giving me this error: reviewdog: parse error: EOF. Not sure if that's another bug? It might relate to issue #10 .)

phrdang commented 4 years ago

Oops, I just realized I had to update the version of this action to v0.3.0. That fixed my issue on the filter_mode option.