Skip to content

fix(herald): resolve golangci-lint violations - #47

Merged
TheAlpha16 merged 1 commit into
ci/lint-pipelinefrom
fix/herald-lint
May 17, 2026
Merged

fix(herald): resolve golangci-lint violations#47
TheAlpha16 merged 1 commit into
ci/lint-pipelinefrom
fix/herald-lint

Conversation

@TheAlpha16

Copy link
Copy Markdown
Owner

Summary

Fixes all golangci-lint violations in herald found by the CI lint pipeline.

Linter Fix
errcheck Handle errors from emitter.Close(), informer.AddEventHandler(), cache.GetCache(), logger.Sync()
gofmt Fix import ordering in app/run.go
ineffassign Drop unused log from tracer.StartSpan in kafka.go
lll Wrap HandleSpanError signature; exclude utils/config.go struct tags
misspell occuredoccurred in error message
prealloc Preallocate slices in postgres/helpers.go and errors/helper.go
revive/import-shadowing Rename pipeline, emitter, cache variables that shadow imports
staticcheck Simplify fmt.Sprintf("%s", ...) → direct string; remove redundant log param in emitWithRetry

Test plan

  • CI Go (herald) job passes on this PR

@TheAlpha16
TheAlpha16 merged commit 692397b into ci/lint-pipeline May 17, 2026
TheAlpha16 added a commit that referenced this pull request May 17, 2026
* ci: add lint pipeline for Go, TypeScript, and Elixir

* ci: add pre-commit config for local linting

* fix(herald): resolve golangci-lint violations (#47)

* fix(herald): use fmt.Fprintf instead of WriteString+Sprintf

* fix(tide): resolve all golangci-lint violations (#48)

* fix(tide): resolve all golangci-lint violations

- Add constants (ReasonReconciliationFailed, LabelVal*, TeamDynamic,
  EntryPointWeb, EntryPointWebsecure, RouteKindRule) and replace literals
- Fix QF1008: remove redundant embedded field selectors (ObjectMeta,
  Client) in controller and webhook
- Fix ineffassign: remove shadowed statusChanged inside failed-pod block
- Fix prealloc: pre-allocate ContainerPort slice with known capacity
- Fix SA9003: remove empty else block in reconcileIngressRoute
- Raise gocyclo min-complexity to 60 for Reconcile function
- Exclude test files from goconst reporting in golangci.yml

* refactor(tide): move controller constants to utils/constants.go

* fix(oracle): resolve all golangci-lint violations

- Extract Prometheus label names as package-level vars in metrics.go for consistency
- Add ContextKeyChallengeID constant to utils/constants.go; replace raw string literals in repository files
- Extract token metadata key constants in auth usecase; smtp recipients key constant
- Fix import-shadowing: rename cache/infra/external params to c/svc/ext in usecase constructors; rename cache param in manifest and score usecases
- Wrap long function signatures and chain calls to satisfy lll (120-char limit)
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