Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2022-08-10 14:58:12 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2022-08-10 15:55:13 +0300
commitd16e2343e194d9cae73876a00305f68f490ce1ff (patch)
tree4b9ba4dcb65aa53ad85a17b9f13ab1f75747ddd1
parent42a21b688122ee28223a209170ce869d12fc51d5 (diff)
golangci-lint: Document why we don't enable `t.Helper()` rulepks-golangci-lint-thelper
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.yml6
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