-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Clean up a load of nolint comments #19599
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
Conversation
c286c11
to
b40fb09
Compare
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.
You love (golangci-lint
) to see it 💥
@@ -801,7 +801,7 @@ func TestResourceWithSecretSerializationNodejs(t *testing.T) { | |||
}) | |||
} | |||
|
|||
//nolint:paralleltest // mutates environment variables | |||
//nolint:paralleltest // Calls t.Setenv in the test |
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.
The linter doesn't see this one?
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.
No seems it only sees things on the main path
tests/stack/stack_test.go
Outdated
@@ -620,7 +620,8 @@ func stackFileFormatAsserters(t *testing.T, e *ptesting.Environment, projectName | |||
return func() { doAssert(true) }, func() { doAssert(false) } | |||
} | |||
|
|||
func TestLocalStateGzip(t *testing.T) { //nolint:paralleltest | |||
//nolint:paralleltest // Calls t.Setenv | |||
func TestLocalStateGzip(t *testing.T) { |
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.
Similar questions about these ones
A combination of just removing nolint comments because the linter can now see t.Setenv calls, fixing the comments for some to correctly say why they are nolint, adding t.Setenv to make some tests more isolated, and adding t.Parallel to some tests that can actually support it.
b40fb09
to
9368529
Compare
Removing nolint comments because the linter can now see t.Setenv calls.
Prompted by #19593 (comment)