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

QF1013: detect strings that could be rewritten with a string literal #1580

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ccoVeille
Copy link

fix #1566

@ccoVeille
Copy link
Author

@ccoVeille
Copy link
Author

The current code is working.

I'm asking for a code review, but also some advice about this code. because it will somehow conflict with what is done in

https://github.com/dominikh/go-tools/blob/master/simple/s1007/s1007.go

as s1007 and q1013 may report twice the error

what would be the best thing to do ?

Thanks

@dominikh
Copy link
Owner

dominikh commented Aug 3, 2024

as s1007 and q1013 may report twice the error

That's probably not much of a problem, especially because QF checks are only used in gopls, not the staticcheck CLI tool, so at worst we'll get two suggestions that fix the same problem. If gopls cares, they can filter the results.

I'll get to review this PR eventually, but it might take a while, as my backlog is fairly long at the moment.

@ccoVeille
Copy link
Author

Noted, thanks

@ccoVeille
Copy link
Author

@Antonboom

I saw your comment here

Maybe you could review quickly.

I'm curious about your point of view about the fact it should be only a quickfix (not not reported via staticcheck, so not reported by golangci-lint)

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.

quickfix QF1013: detect quoted string escaping quote, while backticks could be used
2 participants