Skip to content

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

Merged
merged 1 commit into from
May 21, 2025
Merged

Clean up a load of nolint comments #19599

merged 1 commit into from
May 21, 2025

Conversation

Frassle
Copy link
Member

@Frassle Frassle commented May 20, 2025

Removing nolint comments because the linter can now see t.Setenv calls.

Prompted by #19593 (comment)

@Frassle Frassle added the impact/no-changelog-required This issue doesn't require a CHANGELOG update label May 20, 2025
@Frassle Frassle force-pushed the fraser/nolinttests branch 6 times, most recently from c286c11 to b40fb09 Compare May 21, 2025 10:57
Copy link
Collaborator

@lunaris lunaris left a 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
Copy link
Collaborator

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?

Copy link
Member Author

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

@@ -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) {
Copy link
Collaborator

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.
@Frassle Frassle force-pushed the fraser/nolinttests branch from b40fb09 to 9368529 Compare May 21, 2025 13:33
@Frassle Frassle marked this pull request as ready for review May 21, 2025 15:05
@Frassle Frassle requested a review from a team as a code owner May 21, 2025 15:05
@Frassle Frassle added this pull request to the merge queue May 21, 2025
Merged via the queue into master with commit 9f8cc1e May 21, 2025
99 of 104 checks passed
@Frassle Frassle deleted the fraser/nolinttests branch May 21, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/no-changelog-required This issue doesn't require a CHANGELOG update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy