Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make misspells with a single correction inline suggestion blocks #40

Open
robin-wayve opened this issue Oct 20, 2021 · 7 comments
Open
Labels
enhancement New feature or request

Comments

@robin-wayve
Copy link

Github has a neat feature to suggest code changes on PR lines: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request

For simple misspells where there is only 1 correction option, it'd be convenient to have them as a suggestion which the reviewer can simply click "Commit suggestion" on.

@peternewman peternewman added the enhancement New feature or request label Oct 20, 2021
@peternewman
Copy link
Collaborator

Yes, I agree 100% . If there were two or three suggestions you could always list them all too, as alternatives. The issue is I don't believe it's possible currently 😞 .

The available options currently seem to just be:
https://github.com/getsentry/action-git-diff-suggestions
https://github.com/reviewdog/action-suggester

But please link to anything relevant within GitHub actions if you've found them? I think there was an issue, but given suggestion is used in it's common sense too I'm struggling to find it currently.

@robin-wayve
Copy link
Author

I had previously implemented this through a Probot with a bit of JavaScript to parse codespell's output and then substitute the suggestions on the line. It worked quite well, but I have not dug into what is possible with Actions.

@robin-wayve
Copy link
Author

It seems like this might be a good way to achieve the same thing: https://github.com/marketplace/actions/action-git-diff-suggestions

@peternewman
Copy link
Collaborator

https://github.com/getsentry/action-git-diff-suggestions

It seems like this might be a good way to achieve the same thing: https://github.com/marketplace/actions/action-git-diff-suggestions

Is there an echo (echo, echo, echo...) in here? 😆

@robin-wayve
Copy link
Author

My bad -- I saw this today and wanted to make a note of it without re-reading the comments 🙃

@peternewman
Copy link
Collaborator

In your defence at least they're different URLs!

I keep meaning to try this on the main Codespell repo against the dictionary sort stuff, given I do such a bad job of guessing sorting when submitting entries.

@peternewman
Copy link
Collaborator

I've re-opened this as while I was joking around, it's still a good idea and something we should try and do (or hopefully GitHub will see sense and finally enable it in due course).

My brief tests on the sorting didn't look too promising unfortunately:
codespell-project/codespell#2253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants