-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
execinquery panics in the presence of url.URL.Query #2835
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
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Hello, It's an issue with execinquery When a fix will be created, our bot will update the linter. |
@lufeee can you take a look at this issue? thank you. |
I created a fix 1uf3/execinquery#7 |
Thanks for reporting. |
This comment was marked as off-topic.
This comment was marked as off-topic.
I see the source repository |
@ninadingole In case it helps, I immediately disabled linters:
disable:
- execinquery See configuration for more information. |
Welcome
Description of the problem
The linter
execinquery
panics when url.URL.Query is used. The core issue is thatexecinquery
assumes any method with a name containingQuery
is a method call toDB.Query
(or its friends), and then it further assumes the number of arguments in those method calls must be at least one. If the assumption is false, it panics.URL.Query
innet/url
is one such example from the standard library. I think the current approach ofexecinquery
could potentially generate too many false positives, and more importantly, it should have avoided panicking in all cases. I thus suggest disabling this linter until it is further improved.Related issue: 1uf3/execinquery#3
Version of golangci-lint
Configuration file
Go environment
Verbose output of running
Code example or link to a public repository
The text was updated successfully, but these errors were encountered: