-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: disable copyloopvar and intrange on Go < 1.22 #4397
Conversation
Nice, makes a lot of sense! I also don't know what's best here regarding log level but making the user aware must be a good thing I guess. I think the common case for this would be users using |
I forget to add directives on the test files 😄 |
6fcbb73
to
c6a3ee4
Compare
c411ec4
to
74f0879
Compare
Sorry for all the commits, switching between 2 Go versions to run tests is a bit painful and confusing. |
9842069
to
0a06a89
Compare
// TODO(ldez) there is a major problem with the executor: | ||
// the parsing of the configuration and the timing to load the configuration and linters are creating unmanageable situations. | ||
// There is no simple solution because it's spaghetti code. | ||
// I need to completely rewrite the command line system and the executor because it's extremely time consuming to debug, |
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.
offtop: let's make an issue?
or how do you track to-do backlog?
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.
I'm currently working on the topic.
22efa8b
to
05caa4d
Compare
I propose to disable
copyloopvar
andintrange
for Go < 1.22 to avoid reporting "false-positives" on at least Go 1.21.The log level is
warn
because we don't display logs with a lower level (ex:info
).But maybe we can just be quiet and just use the level
info
🤔Note: I know that
loopvar
can be enabled on go1.21 but if you do that it's better to either use go1.22 or override the Go version inside the golangci-lint configuration and enable the right linters.