Skip to content

Conversation

@thaJeztah
Copy link
Member

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

- A picture of a cute animal (not mandatory but encouraged)

@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 72.00000% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cli/command/stack/loader.go 0.00% 2 Missing ⚠️
cli-plugins/manager/cobra.go 0.00% 1 Missing ⚠️
cli/compose/convert/service.go 83.33% 1 Missing ⚠️
opts/gpus.go 0.00% 1 Missing ⚠️
opts/swarmopts/config.go 0.00% 1 Missing ⚠️
opts/swarmopts/secret.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah changed the title Dockerfile: update golangci-lint to v2.9.0 Dockerfile: update golangci-lint to v2.9.0 and fix linting Feb 11, 2026
@thaJeztah thaJeztah added area/testing kind/refactor PR's that refactor, or clean-up code labels Feb 11, 2026
@thaJeztah thaJeztah added this to the 29.2.2 milestone Feb 11, 2026
@thaJeztah thaJeztah requested a review from Copilot February 11, 2026 10:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the golangci-lint version to v2.9.0 and resolves linting issues identified by the updated linter. The changes primarily focus on optimizing slice allocations by preallocating capacity where the final size is known, which improves performance and memory efficiency. The PR also includes cleanup of nolint directives and minor code refactoring.

Changes:

  • Updated golangci-lint version from v2.6.1 to v2.9.0 in Dockerfile.lint
  • Preallocated slices with known capacity throughout the codebase to satisfy the prealloc linter
  • Removed unnecessary nolint:prealloc and nolint:perfsprint directives where code now satisfies the linter
  • Added nolint:prealloc directives in test files where preallocation would over-complicate test initialization

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
dockerfiles/Dockerfile.lint Updated golangci-lint version from v2.6.1 to v2.9.0
opts/swarmopts/secret.go Preallocated secrets slice with capacity based on o.values length
opts/swarmopts/config.go Preallocated configs slice with capacity based on o.values length
opts/mount.go Preallocated mounts slice with capacity based on m.values length
opts/gpus.go Preallocated gpus slice with capacity based on o.values length
internal/volumespec/volumespec.go Preallocated buffer with spec length capacity; use buffer[:0] to reset
cli/connhelper/ssh/ssh.go Removed nolint:perfsprint directive (no longer needed)
cli/compose/loader/merge.go Preallocated slices in multiple converter functions based on map length
cli/compose/convert/service.go Added early nil return for empty preferences; preallocated slices; moved refs declaration after validation
cli/command/system/events.go Preallocated keys and attrs slices with known capacities
cli/command/swarm/opts.go Preallocated externalCAs slice with capacity based on m.values length
cli/command/stack/loader.go Moved dicts computation after loader.Load success; preallocated dicts slice
cli/command/service/update.go Removed nolint:prealloc directive (no longer needed)
cli/command/service/progress/progress_test.go Added nolint:prealloc directives for test data initialization; changed slice composite literals
cli/command/service/list_test.go Preallocated matrix slice with capacity based on tests length
cli/command/image/build_test.go Changed to var declaration for headers; preallocated names slice after getting headers length
cli/command/formatter/container.go Removed nolint:prealloc directive (no longer needed)
cli-plugins/manager/cobra.go Added nolint:prealloc directive for simple slice initialization

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing kind/refactor PR's that refactor, or clean-up code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants