-
Notifications
You must be signed in to change notification settings - Fork 7
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
improve report msg #12
Conversation
testdata/src/a/a_test.go
Outdated
_ = err | ||
} | ||
} | ||
|
||
func testTB(tb testing.TB) { | ||
os.Setenv("a", "b") // want "func testTB is not using testing.Setenv" | ||
os.Setenv("a", "b") // want "os.Setenv() can be replaced by `tb.Setenv()` in testTB" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
os.Setenv("a", "b") // want "os.Setenv() can be replaced by `tb.Setenv()` in testTB" | |
os.Setenv("a", "b") // want "os\\.Setenv\\(\\) can be replaced by `tb\\.Setenv\\(\\)` in testTB" |
testdata/src/a/a_test.go
Outdated
os.Setenv("a", "b") // want "os.Setenv() can be replaced by `b.Setenv()` in BenchmarkF" | ||
if err := os.Setenv("a", "b"); err != nil { // want "os.Setenv() can be replaced by `b.Setenv()` in BenchmarkF" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
os.Setenv("a", "b") // want "os.Setenv() can be replaced by `b.Setenv()` in BenchmarkF" | |
if err := os.Setenv("a", "b"); err != nil { // want "os.Setenv() can be replaced by `b.Setenv()` in BenchmarkF" | |
os.Setenv("a", "b") // want "os\\.Setenv\\(\\) can be replaced by `b\\.Setenv\\(\\)` in BenchmarkF" | |
if err := os.Setenv("a", "b"); err != nil { // want "os\\.Setenv\\(\\) can be replaced by `b\\.Setenv\\(\\)` in BenchmarkF" |
testdata/src/a/a_test.go
Outdated
os.Setenv("a", "b") // want "os.Setenv() can be replaced by `t.Setenv()` in TestF" | ||
if err := os.Setenv("a", "b"); err != nil { // want "os.Setenv() can be replaced by `t.Setenv()` in TestF" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
os.Setenv("a", "b") // want "os.Setenv() can be replaced by `t.Setenv()` in TestF" | |
if err := os.Setenv("a", "b"); err != nil { // want "os.Setenv() can be replaced by `t.Setenv()` in TestF" | |
os.Setenv("a", "b") // want "os\\.Setenv\\(\\) can be replaced by `t\\.Setenv\\(\\)` in TestF" | |
if err := os.Setenv("a", "b"); err != nil { // want "os\\.Setenv\\(\\) can be replaced by `t\\.Setenv\\(\\)` in TestF" |
The |
Thanks! I've mistook. |
No description provided.