Files
Terry Howe dd9fd71861 chore(agent): re-enable dupword, errchkjson, misspell, wastedassign, whitespace (#1932)
Step 2 of #938, the "near-free" group. 14 findings, all fixed rather than
excluded:

- misspell (8) — British spellings in comments and log/status strings. The one
  user-visible string, "node succesfully reset/deleted", is not matched on
  anywhere in the repo, so correcting it is safe.
- errchkjson (2) — json.MarshalIndent errors were discarded in two tests.
- whitespace (2) — stray blank lines before a closing brace.
- dupword (1) — "the the".
- wastedassign (1) — installErr was initialised to nil and reassigned on every
  path before use.

These linters were listed under `disable:` but are not in golangci-lint's
default set, so that entry alone never enabled them. Each is added to `enable:`
as well, in alphabetical position.

dupl stays disabled. It is listed as near-free in the issue, but its 3 findings
are six near-identical functions in internal/k8s/cmds.go that want a real
refactor, so it belongs in its own PR. Its comment now says so.

`gmake -C agent lint` is clean.

Part of #938.

Signed-off-by: Terry Howe <thowe@nvidia.com>
2026-10-27 05:48:31 -06:00
..