-
Notifications
You must be signed in to change notification settings - Fork 3
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
Flagging non-buggy and legal code #10
Comments
I don't get similar output. source: package chitst
import (
"net/http"
"github.com/go-chi/chi/v5"
)
func find(w http.ResponseWriter, r *http.Request) {
id := chi.URLParam(r, "id")
_ = id
} can you share the complete code? |
I've got a similar issue: the linter tells me to pass context to the function without any parameters.
for rows.Next() {
select {
case <-ctx.Done():
err = rows.Close() //nolint:contextcheck
if err != nil {
// ...
}
return
default:
// ...
}
} golangci-lint version v1.55.1 |
You can add //nolint:contextcheck in the comment of the Close method you specified for this case, please refer to README.md. |
Hi,
I don't understand why this code should be flagged. Any explanation or realistic reason would be appreciated for going deep to raise the flag.
Thanks
Using:
The text was updated successfully, but these errors were encountered: