Skip to content

Fix golangci-lint failures from new linter version - #331

Merged
kke merged 1 commit into
mainfrom
fix-lint
May 4, 2026
Merged

kke merged 1 commit into
mainfrom
fix-lint

Conversation

@kke

@kke kke commented May 4, 2026

Copy link
Copy Markdown
Contributor
  • reflect.Ptr → reflect.Pointer (govet inline, 15 sites in kv and sshconfig)
  • Extract repeated string constants for goconst (os/release.go arch strings, sshconfig Host/match/include/KbdInteractiveAuthentication keys)
  • Remove stale //nolint:gosec G115 directives on os.Stdin.Fd() conversions (passphrase.go, protocol/ssh/connection.go, protocol/ssh/signals.go)
  • Remove stale //nolint:errcheck on gzip w.Close() in powershell.go
  • Add sentinel errOddUTF16Length and wrap base64 error in cmd/executor.go decodeUTF16LE (err113, wrapcheck)
  • Add //nolint:gosec G115 on intentional uint16→byte truncation in powershell EncodeCmd UTF-16LE encoder
  • Fix godot: period at end of metacharacter guard comment
  • Fix gci: import/variable group formatting in cmd/executor.go

- reflect.Ptr → reflect.Pointer (govet inline, 15 sites in kv and sshconfig)
- Extract repeated string constants for goconst (os/release.go arch strings,
  sshconfig Host/match/include/KbdInteractiveAuthentication keys)
- Remove stale //nolint:gosec G115 directives on os.Stdin.Fd() conversions
  (passphrase.go, protocol/ssh/connection.go, protocol/ssh/signals.go)
- Remove stale //nolint:errcheck on gzip w.Close() in powershell.go
- Add sentinel errOddUTF16Length and wrap base64 error in cmd/executor.go
  decodeUTF16LE (err113, wrapcheck)
- Add //nolint:gosec G115 on intentional uint16→byte truncation in
  powershell EncodeCmd UTF-16LE encoder
- Fix godot: period at end of metacharacter guard comment
- Fix gci: import/variable group formatting in cmd/executor.go

Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
@kke
kke marked this pull request as ready for review May 4, 2026 10:49
@kke
kke merged commit 99a5792 into main May 4, 2026
11 checks passed
@kke
kke deleted the fix-lint branch May 4, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant