Here is a sample code that triggers a thelper issue.
Arguably this is not a helper: this is an unexported test function and I am okay to have all the detailed line numbers reported
with any failure inside this function. It looks like since I've adopted generics in my test suites, the thelper check raises a lot of
false positives.
Please advise.
version: v0.71. (via golangci-lint)
go version go1.25.5 linux/amd64
//nolint:thelper // false positive: this is not a helper
func testAllMarshalAs[Doc Text, Object any](value Object, jazon Doc, success bool) func(*testing.T) {
return func(t *testing.T) {
t.Run("with JSONMarshalAsT", testJSONMarshalAsT(value, jazon, success))
t.Run("with JSONUnmarshalAsT", testJSONUnmarshalAsT(value, jazon, success))
}
}
Here is a sample code that triggers a thelper issue.
Arguably this is not a helper: this is an unexported test function and I am okay to have all the detailed line numbers reported
with any failure inside this function. It looks like since I've adopted generics in my test suites, the thelper check raises a lot of
false positives.
Please advise.
version: v0.71. (via golangci-lint)
go version go1.25.5 linux/amd64