Skip to content

cmd/buildctl: fix usetesting linting - #7063

Merged
crazy-max merged 1 commit into
moby:masterfrom
thaJeztah:fix_linting
Aug 24, 2026
Merged

cmd/buildctl: fix usetesting linting#7063
crazy-max merged 1 commit into
moby:masterfrom
thaJeztah:fix_linting

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

Linter incorectly suggests using t.SetEnv, but we need to unset the env-var;

level=warning msg="[runner/exclusion_rules] Skipped 0 issues by rules: [Path: \".*\\\\.pb\\\\.go$\", Linters: \"gofmt, goimports\"]"
cmd/buildctl/build/opt_test.go:89:25: os.Setenv() could be replaced by t.Setenv() in TestParseOpt (usetesting)
 					t.Cleanup(func() { os.Setenv(k, v) })
 					                   ^

Linter incorectly suggests using t.SetEnv, but we need to unset the
env-var;

    level=warning msg="[runner/exclusion_rules] Skipped 0 issues by rules: [Path: \".*\\\\.pb\\\\.go$\", Linters: \"gofmt, goimports\"]"
    cmd/buildctl/build/opt_test.go:89:25: os.Setenv() could be replaced by t.Setenv() in TestParseOpt (usetesting)
     					t.Cleanup(func() { os.Setenv(k, v) })
     					                   ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@crazy-max
crazy-max merged commit 0bf395a into moby:master Aug 24, 2026
199 checks passed
@thaJeztah
thaJeztah deleted the fix_linting branch August 24, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants