reviewdog / action-rubocop

Run rubocop with reviewdog 🐶

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible to suggest linting corrections?

aharpervc opened this issue · comments

Hi, I see it's possible to have reviewdog leave a comment for linting errors. However, it'd be useful if it suggested the corresponding linting correction as well, so that users could apply the suggestion in one click. Is it possible to set up reviewdog to offer suggested corrections as well?

HI, action-rubocop already has the suggestion feature since v2.0.0. Why don't you try it?

ref #28

HI, action-rubocop already has the suggestion feature since v2.0.0. Why don't you try it?

ref #28

Yes, this looks like what I want. It looks like the solution is to combine this repo with https://github.com/reviewdog/action-suggester. Where is the documentation for how to enable that? I looked in the readme and also generally searched this repo and I didn't get any hits, besides this issue and your linked issue.

You don't have to enable the feature, it automatically works by default.
If your GitHub Action doesn't suggest anything, there would be possibilities below.

  • You're using action-rubocop@v1
  • Your offenses are not correctable by rubocop. As you may know, rubocop can't correct all offenses.

Okay, thanks, I set it up following https://docs.github.com/en/actions/quickstart & the example config from the readme. So I think this issue can be closed, thanks for the help!


As an aside, I found the setup process to be fairly confusing

  • no "suggestion" example in the readme
  • readme screenshots show other config modes, but not suggestion mode
  • the marketplace listing is really unclear what is the right version to expect:

image

- clicking the "use latest version" button shows this screen which basically gives me no instruction on what to actually do (might be GitHub's problem not yours...):

Oh, I realized that's the reason why some people still start using action-rubocop@v1...! Thanks for the info.
Regarding the marketplace issue, I'll continue on #74.