-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[27.x backport] Fix linting issues in preparation of Go and GolangCI-lint update #5372
Merged
vvoland
merged 4 commits into
docker:27.x
from
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.x
from
thaJeztah:27.x_backport_fix_linting_issues
Aug 26, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
thaJeztah
commented
Aug 26, 2024
- backport Fix linting issues in preparation of Go and GolangCI-lint update #5370
- minor conflicts because cli: improve output and consistency for unknown (sub)commands #5234 is not in the 27.x branch
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 <[email protected]> (cherry picked from commit cc1d7b7) Signed-off-by: Sebastiaan van Stijn <[email protected]>
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 <[email protected]> (cherry picked from commit f101f07) Signed-off-by: Sebastiaan van Stijn <[email protected]>
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 <[email protected]> (cherry picked from commit 9c87891) Signed-off-by: Sebastiaan van Stijn <[email protected]>
thaJeztah
changed the title
27.x backport fix linting issues
[27.x backport] Fix linting issues in preparation of Go and GolangCI-lint update
Aug 26, 2024
This comment was marked as resolved.
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 <[email protected]> (cherry picked from commit c4a55df) Signed-off-by: Sebastiaan van Stijn <[email protected]>
thaJeztah
force-pushed
the
27.x_backport_fix_linting_issues
branch
from
August 26, 2024 12:49
918c081
to
64b9e4c
Compare
Codecov ReportAttention: Patch coverage is
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 |
krissetto
approved these changes
Aug 26, 2024
vvoland
approved these changes
Aug 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.