https://github.com/gostaticanalysis/testhelper
Analyzer: testhelper finds a package function which is not a test function and receives a value of *testing.T as a parameter but it does not call (*testing.T).Helper
https://github.com/gostaticanalysis/testhelper
golang staticanalysis
Last synced: 25 days ago
JSON representation
Analyzer: testhelper finds a package function which is not a test function and receives a value of *testing.T as a parameter but it does not call (*testing.T).Helper
- Host: GitHub
- URL: https://github.com/gostaticanalysis/testhelper
- Owner: gostaticanalysis
- License: mit
- Created: 2021-03-08T09:25:42.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-19T01:52:52.000Z (almost 5 years ago)
- Last Synced: 2023-07-27T22:10:26.285Z (over 2 years ago)
- Topics: golang, staticanalysis
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 2
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# testhelper
[![pkg.go.dev][gopkg-badge]][gopkg]
`testhelper` finds a package function which is not a test function and receives a value of `*testing.T` as a parameter but it does not call `(*testing.T).Helper`.
```go
// OK
func helper1(t *testing.T) {
t.Helper()
}
// NG
func helper2(t *testing.T) {
// without t.Helper
}
```
[gopkg]: https://pkg.go.dev/github.com/gostaticanalysis/testhelper
[gopkg-badge]: https://pkg.go.dev/badge/github.com/gostaticanalysis/testhelper?status.svg