After commit a2c3e11, v1.0.8, I'm getting reports that I think are false positives.
There's an underlying function
func WriteProblem(w http.ResponseWriter, r *http.Request, problem *Problem, originalError error) error
...which calls r.Context(), and another function that calls it (but not r.Context() directly) like
func writeProblemResponse(w http.ResponseWriter, r *http.Request, err error)
Now, every WriteProblem and writeProblemResponse call gets flagged as "should pass the context parameter". I suppose the intent is not to do that. r.Context() is used where a Context can be used.
v1.0.7 did not have this problem.
Also, for reasons I cannot explain, I'm also seeing this problem with golangci-lint v1.49.0, which uses contextcheck v1.0.6. But I cannot replicate the problem with contextcheck v1.0.6 directly 🤔
After commit a2c3e11, v1.0.8, I'm getting reports that I think are false positives.
There's an underlying function
...which calls
r.Context(), and another function that calls it (but notr.Context()directly) likeNow, every
WriteProblemandwriteProblemResponsecall gets flagged as "should pass the context parameter". I suppose the intent is not to do that.r.Context()is used where aContextcan be used.v1.0.7 did not have this problem.
Also, for reasons I cannot explain, I'm also seeing this problem with golangci-lint v1.49.0, which uses contextcheck v1.0.6. But I cannot replicate the problem with contextcheck v1.0.6 directly 🤔