-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Supress not used test & benchmark functions #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
false positive
An error is reported when one does not exist
Comments
Thank you, it looks like a bug of linters, can you give more information? Maybe you can give minimal reproducible example or full file? |
Minimal example: bug repeated for file test_test.go package main
import "testing"
func TestTest(t *testing.T) {
} golangci-lint --version
golangci-lint has version 1.7.2 built from 93311ae on 2018-06-19T13:43:26Z
golangci-lint run
test_test.go:5:6: `TestTest` is unused (deadcode)
func TestTest(t *testing.T) {
^ |
Still not fixed? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
_test.go files have Benchmark... and Test... functions - it isn't use in main program and linters warning many times about dead code.
I think these errors have to be supress by default for these functions.
The text was updated successfully, but these errors were encountered: