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

checkers: add fixable for commentFormatting (#1190) #1191

Merged
merged 2 commits into from Jan 8, 2022

Conversation

okhowang
Copy link
Contributor

@okhowang okhowang commented Jan 7, 2022

Fixes #1190

Copy link
Member

@cristaloleg cristaloleg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm

@quasilyte
Copy link
Member

This will add extra spaces inside comments:

//Comment with //inside other comment
=>
// Comment with // inside other comment

I don't think that it's a big deal, but it makes it less reliable in general as it does more changes than it should.

@okhowang
Copy link
Contributor Author

okhowang commented Jan 8, 2022

This will add extra spaces inside comments:

//Comment with //inside other comment
=>
// Comment with // inside other comment

I don't think that it's a big deal, but it makes it less reliable in general as it does more changes than it should.

I use strings.Replace with n=1 which mean replace only first //

@quasilyte
Copy link
Member

Ah, that's true.

@quasilyte quasilyte merged commit f0a10a0 into go-critic:master Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support autofix for commentFormatting
3 participants