Clean up the ST1003 and QF1008 findings that golangci-lint v2 surfaced
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- go
- Domain
- infrastructure
Research direction
Start in pkg/infrastructure/kubernetes/unleash_repository.go and review all ST1003 initialism and QF1008 selector findings reported by golangci-lint. After the reconciler stack has landed, update the affected names and selectors, remove both exclusions from .golangci.yml, and run mise run lint and mise run check until they are clean.
Written by the indexing model from the issue text.
Description
Summary
#572 upgrades golangci-lint to v2, which folds stylecheck into staticcheck and therefore surfaces the ST checks for the first time. It reported 18 pre-existing findings. They are excluded in .golangci.yml for now so the upgrade lands without mixing in unrelated code changes, but they are worth fixing.
Severity: low — style only, no behaviour change
Component: mostly pkg/infrastructure/kubernetes/unleash_repository.go
Findings
14 × ST1003 — initialisms should be capitalised:
unleash_repository.go:593 var cloudSqlProto → cloudSQLProto
unleash_repository.go:594 var cloudSqlPort → cloudSQLPort
unleash_repository.go:607 const SqlProxyRequestCPU → SQLProxyRequestCPU
unleash_repository.go:608 const SqlProxyRequestMemory → SQLProxyRequestMemory
unleash_repository.go:609 const SqlProxyLimitMemory → SQLProxyLimitMemory
…and the rest in the same file.
4 × QF1008 — redundant embedded field in selector, e.g. unleashNew.ObjectMeta.Generation can be written unleashNew.Generation.
Why not in #572
These all live in unleash_repository.go, which the reconciler stack (#549, #550, #551) also modifies. Renaming symbols there while those PRs are open would create rebase conflicts for no benefit. Best done once that stack has landed.
Acceptance criteria
- ST1003 and QF1008 findings fixed.
- The
-ST1003and-QF1008exclusions removed from.golangci.yml. -
mise run lintandmise run checkboth clean.
- Dominant language
- Go
- Stars
- 0
- Forks
- 0
- Avg merge
- 7h 56m
- Merged PRs (30d)
- 24
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nais/bifrost
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 50/100
-
bug reconciler
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100