tj-actions / eslint-changed-files

:octocat: Github action to run ESLint on changed pull request files with support for reporting errors via Github checks.
MIT License
84 stars 21 forks source link

[Feature] Add the ability to skip annotation comments on unchanged sections #431

Closed thatkookooguy closed 2 years ago

thatkookooguy commented 2 years ago

Is this feature missing in the latest version?

Is your feature request related to a problem? Please describe.

I've implemented the github action in a project we're linting little by little. This means that each file we change, has a very large number of lint errors. It's hard to see what is actually relating to the changed lines themselves

Describe the solution you'd like?

Having an optional parameter for the github action to skip comments in changed files that are not in changed lines

Describe alternatives you've considered?

Currently, I'm just hiding all the annotation in GitHub to show only the reviewdog comments (which are relevant to the changed lines)

Anything else?

No response

Code of Conduct

github-actions[bot] commented 2 years ago

Thanks for reporting this issue.

jackton1 commented 2 years ago

@Thatkookooguy Sorry for the delay this should now be available in the latest release

thatkookooguy commented 2 years ago

This is great! Thank you! 🙏🏽 Now we have a lot less comments unrelated to the changed lines.

But I do think that it might be better to also ignore those errors when reporting on the outcome. Now, there are no comments (since the changed code is linted and fine), but the unchanged code still counts as errors for the pipeline and the pipeline is marked as failed.

I can live with the current behavior tho if this is too big of a feature or you think it's not a good behavior.

I also don't mind trying to implement it if you prefer

jackton1 commented 2 years ago

@Thatkookooguy can you include a sample log output of the error that’s reported ?

thatkookooguy commented 2 years ago

Sure, I'll share it when I get home.

But I mean linter errors for lines that have not changed in files that do

I'll create a MRE and share it with you

jackton1 commented 2 years ago

@Thatkookooguy any updates on this?