-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
mirror: linter that suggest using alternative string/[]byte functions #3825
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
Conversation
In order for a pull request adding a linter to be reviewed, the linter and the PR must follow some requirements.
Pull Request Description
Linter
The Linter Tests Inside Golangci-lint
|
|
After I read last line - I have uncheck "The linter must be added to the list of available linters (alphabetical case-insensitive order)." (and few others), so my hands are clear! |
Don't add this linter before the data race bug is fixed: butuzov/mirror#17 |
The data race bug is now fixed on the main branch in the mirror repo, |
As I did a fix and introduced SuggestedFixes to |
There's an issue for this in #1779. Also there was a fix in #2609 that got closed. |
Hi @bombsimon for now |
@ldez is the anything else I can do to make my PR better? (may be I am missing something) |
fixed error in linter in go1.19 used
fixes a "failed release" with bad tag already propagated to go.sum
This linter is closed to a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
For people that will watch this PR, please think to support his author: butuzov
Which gocritic rule is that? We use gocritic and I imagine that we probably use such a rule, but mirror points out other cases that our current configuration of gocritic hasn't found. |
The following experimental go-critic rules: |
thanks!
And thank you again! |
mirror
- linter suggest alternative functions while working withstrings/[]byte
(e.g.strings.HasPrefix
andbytes.HasPrefix
, if it alternative can be used).gocritic
as experimental implementation ofio.Writer
andio.StringWriter
detection, which is fitting to the functionality ofmirror
, butmirror
instead checking additional functions from std lib, ignoring (for now) interface checking forio.Writer
/io.StringWriter