diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-08-10 14:58:12 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-08-11 15:09:36 +0300 |
commit | 947d38c20a43048bfbd0f7c959c7de0c09a74d9d (patch) | |
tree | 649350c1e985e89541b194d0cafc5829c312525a | |
parent | a466659bb61ed28cfce9676c64fa0351e61c5ab7 (diff) |
golangci-lint: Document why we don't enable `t.Helper()` rule
The `thelper` linter has a rule that will flag test helper functions
that don't call `t.Helper()`. Unfortunately, this will also flag all
kinds of functions that really shouldn't have this call, which makes the
linter effectively useless for us.
Document why we disable it to not keep folks wondering.
-rw-r--r-- | .golangci.yml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/.golangci.yml b/.golangci.yml index ba25ce105..2c667e980 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -76,6 +76,12 @@ linters-settings: checks: [ "all", "-ST1000" ] thelper: test: + # The following linter would check whether we always call `t.Helper()` in + # functions that are not the top-level testcase. While this is nice in + # theory, in practice it would also impact e.g. usecases like + # `testhelper.NewFeatureSets(...).Run(t, testWithFeatures)`. This isn't + # really what we want, so we just leave these as disabled for the time + # being. begin: false benchmark: begin: false |