fix(lint): clear the two findings #268 left on main - #269
Merged
Conversation
The Lint job was already red when HashLoad#268 merged, on two findings from that PR: setup/migrations.go:59: cognitive complexity 25 of func `seven` (gocognit) pkg/env/legacy_auth_test.go:76: declaration of "err" shadows line 70 (govet) `seven` grew past the threshold because the rewrite dropped the //nolint the original carried. Rather than put the suppression back, the per-entry work moves into migrateLegacyAuth and the decrypt-or-warn step into decryptLegacy, which reads better than the three near-identical blocks it replaces and takes the complexity down on its own. No behaviour change: `go test ./...` stays green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #269 +/- ##
=======================================
Coverage ? 28.26%
=======================================
Files ? 90
Lines ? 5678
Branches ? 0
=======================================
Hits ? 1605
Misses ? 3936
Partials ? 137
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Aug 3, 2026
Merged
This file contains hidden or 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
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.
O job de Lint já estava vermelho quando o #268 mergeou, em dois achados daquele PR:
Build, Test e Security Scan passaram — só o Lint ficou.
O que mudou
sevenpassou do limite porque a reescrita do #268 largou o//nolint:gocognitque a versão original carregava. Em vez de recolocar a supressão, o trabalho por entrada foi paramigrateLegacyAuthe o passo de decriptar-ou-avisar paradecryptLegacy. Lê melhor que os três blocos quase idênticos que substitui, e derruba a complexidade por conta própria.No teste, o
errinterno virouwriteErr.Sem mudança de comportamento:
go test ./...segue verde nos 29 pacotes.🤖 Generated with Claude Code