Skip to content

[27.x backport] Fix linting issues in preparation of Go and GolangCI-lint update - #5372

Merged
vvoland merged 4 commits into
docker:27.xfrom
thaJeztah:27.x_backport_fix_linting_issues
Aug 26, 2024
Merged

[27.x backport] Fix linting issues in preparation of Go and GolangCI-lint update#5372
vvoland merged 4 commits into
docker:27.xfrom
thaJeztah:27.x_backport_fix_linting_issues

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

 cli/command/system/info.go:375:5: S1009: should omit nil check; len() for []github.com/docker/docker/api/types/system.NetworkAddressPool is defined as zero (gosimple)
if info.DefaultAddressPools != nil && len(info.DefaultAddressPools) > 0 {
^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit cc1d7b7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
 cli/command/utils.go:225:29: printf: non-constant format string in call to github.com/pkg/errors.Wrapf (govet)
return errors.Wrapf(err, fmt.Sprintf("invalid output path: %q must be a directory or a regular file", path))
^
cli/command/manifest/cmd.go:21:33: printf: non-constant format string in call to fmt.Fprintf (govet)
fmt.Fprintf(dockerCli.Err(), "\n"+cmd.UsageString())
^
cli/command/service/remove.go:45:24: printf: non-constant format string in call to github.com/pkg/errors.Errorf (govet)
return errors.Errorf(strings.Join(errs, "\n"))
^
cli/command/service/scale.go:93:23: printf: non-constant format string in call to github.com/pkg/errors.Errorf (govet)
return errors.Errorf(strings.Join(errs, "\n"))
^
cli/command/stack/swarm/remove.go:74:24: printf: non-constant format string in call to github.com/pkg/errors.Errorf (govet)
return errors.Errorf(strings.Join(errs, "\n"))
^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f101f07)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
 e2e/global/cli_test.go:217:28: printf: non-constant format string in call to gotest.tools/v3/poll.Continue (govet)
return poll.Continue(err.Error())
^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9c87891)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztahthaJeztah added this to the 27.2.0 milestone Aug 26, 2024
@thaJeztah
thaJeztah requested review from a team and silvin-lubecki as code ownersAugust 26, 2024 12:44
@thaJeztahthaJeztah changed the title 27.x backport fix linting issues[27.x backport] Fix linting issues in preparation of Go and GolangCI-lint updateAug 26, 2024
@thaJeztahthaJeztah self-assigned this Aug 26, 2024
@thaJeztah

This comment was marked as resolved.

 cli/required.go:33:22: param min has same name as predeclared identifier (predeclared)
func RequiresMinArgs(min int) cobra.PositionalArgs {
^
cli/required.go:50:22: param max has same name as predeclared identifier (predeclared)
func RequiresMaxArgs(max int) cobra.PositionalArgs {
^
cli/required.go:67:24: param min has same name as predeclared identifier (predeclared)
func RequiresRangeArgs(min int, max int) cobra.PositionalArgs {
^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c4a55df)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
thaJeztahforce-pushed the 27.x_backport_fix_linting_issues branch from 918c081 to 64b9e4cCompareAugust 26, 2024 12:49
@codecov-commenter

codecov-commenter commented Aug 26, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 66.66667% with 7 lines in your changes missing coverage. Please review.

Project coverage is 60.98%. Comparing base (8e94ed1) to head (64b9e4c).
Report is 6 commits behind head on 27.x.

Additional details and impacted files
@@ Coverage Diff @@## 27.x #5372 +/- ##
=======================================
Coverage 60.98% 60.98% =======================================
Files 304 304 Lines 21359 21359 =======================================
Hits 13025 13025 Misses 7404 7404 Partials 930 930 

@vvoland
vvoland merged commit 5d17c29 into docker:27.xAug 26, 2024
@thaJeztah
thaJeztah deleted the 27.x_backport_fix_linting_issues branch August 26, 2024 15:34
Sign up for freeto 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.

4 participants

@thaJeztah@codecov-commenter@vvoland@krissetto