reviewdog / action-flake8

Runs flake8 with Reviewdog :dog:
https://github.com/reviewdog/reviewdog
MIT License
17 stars 7 forks source link

annotations not showing when using multiple steps of action-flake8 #31

Closed laureanorp closed 2 years ago

laureanorp commented 3 years ago

Hello! I've configured this action for a project and we are adding checks slowly. For example, we check for W605 on the whole project:

  - name: flake8 W605 on project
    uses: reviewdog/action-flake8@v3
    with:
      github_token: ${{ secrets.GITHUB_TOKEN }}
      flake8_args: --select=W605
      reporter: github-check
      filter_mode: nofilter

This works flawlessly. But now that I want to add a new rule/flake8 code (W292), it's not working:

- name: flake8 W605, W292 on project
    uses: reviewdog/action-flake8@v3
    with:
      github_token: ${{ secrets.GITHUB_TOKEN }}
      flake8_args: --select=W605,W292
      reporter: github-check
      filter_mode: nofilter

Note the flake8_args: --select=W605,W292. The action won't detect W292 neither W605. I have also tried with flake8_args: --select=W605, W292 and flake8_args: --select=W605, --select=W292. Always 0 findings.

Of course, using two separate actions for both error codes work, the findings appear, but it's far from a perfect solution.

image

What's the correct way to include a list of errors in --select?

laureanorp commented 3 years ago

Update: It seems is not a problem of --select, but a problem when using several steps. I added just 1 step with flake8_args: --select=W605,W292 and it works. Now my problem is that, each step makes it's own annotations, but in the end only the annotations for the last step are shown. I don't know if you have experimented this behaviour. Have you used this action with more than one step?

rickstaa commented 3 years ago

@laureanorp Thanks for your issue! I have not tried using multiple steps myself, but it should work unless the GitHub annotation max is reached (for more information https://github.com/reviewdog/reviewdog/issues/411#issuecomment-570893427).

I will try to debug it this weekend. Can you maybe send the new recipe code for the solution that is working?

laureanorp commented 3 years ago

Hello! I don't really have a recipe, but what I did to replicate the error is basically add two steps with different checks. Then, even if both steps produce annotations, the final results of the action will only show the annotations for the final step.

rickstaa commented 3 years ago

@laureanorp I didn't yet have time to debug the problem you are experiencing. I however quickly checked the reviewdog repository. I think your issue is related to https://github.com/reviewdog/reviewdog/issues/343?

rickstaa commented 2 years ago

@laureanorp I closed this action since it seems related to https://github.com/reviewdog/reviewdog/issues/343. Feel free to comment below if you think it is still caused by the https://github.com/reviewdog/action-flake8 extension.