summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Winder <wwinder.unh@gmail.com>2021-12-15 09:30:21 -0500
committerGitHub <noreply@github.com>2021-12-15 09:30:21 -0500
commit34e2fbd1282747f662fb9f418d03c11746818080 (patch)
tree007054470bb219dfd1dbb8e2029c9566ae168d0d
parentac5f839ad2c2df6ca5c86338f09e2d6293cc34d7 (diff)
testing: reword partitiontest lint message. (#3297)
## Summary The wording on this was tripping me, maybe I was having an off day. I think it would be slightly easier if the message were to tell exactly what you need to do (and not use the angle brackets).
-rw-r--r--cmd/partitiontest_linter/linter.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/partitiontest_linter/linter.go b/cmd/partitiontest_linter/linter.go
index 27ffbf14e..e2086c652 100644
--- a/cmd/partitiontest_linter/linter.go
+++ b/cmd/partitiontest_linter/linter.go
@@ -28,6 +28,7 @@ const functionName string = "PartitionTest"
const fileNameSuffix string = "_test.go"
const functionNamePrefix string = "Test"
const parameterType string = "T"
+const parameterName string = "t"
// Analyzer initilization
var Analyzer = &analysis.Analyzer{
@@ -58,7 +59,7 @@ func run(pass *analysis.Pass) (interface{}, error) {
continue
}
if !isSearchLineInFunction(fn) {
- pass.Reportf(fn.Pos(), "%s function is missing %s.%s(<%s type parameter>)", fn.Name.Name, packageName, functionName, parameterType)
+ pass.Reportf(fn.Pos(), "%s: Add missing partition call to top of test. To disable partitioning, add it as a comment: %s.%s(%s)", fn.Name.Name, packageName, functionName, parameterName)
}
}