Skip to content

Install golangci-lint and fix lint issues#3

Merged
riccardo-perotti merged 3 commits into
masterfrom
rp.ROP-9229.install-golangci-lint-in-dbr-go
Jun 8, 2026
Merged

Install golangci-lint and fix lint issues#3
riccardo-perotti merged 3 commits into
masterfrom
rp.ROP-9229.install-golangci-lint-in-dbr-go

Conversation

@riccardo-perotti

Copy link
Copy Markdown
Contributor

Installs golangci-lint in CI and fixes all reported issues (7). Lint clean (0 issues); build/vet/test pass. dbr-go has no gudtech module deps.

CI

Added a lint job to .github/workflows/build.yml (golangci/golangci-lint-action@v6, Go 1.26) — the live pipeline. The .circleci/config.yml is a dead stub and was left untouched. No .golangci.yml — default linters.

Fixes by file

common.go

  • io/ioutilos.ReadFile ×2 (SA1019 + govet inline); dropped the io/ioutil import.
  • ST1005: lowercased "multi-section DBR configs not supported" and "pool being closed".
  • RestrictedReadAccounts: fmt.Errorf (no args) → errors.New, plus a //nolint:staticcheck for ST1012 (see note).

account.go — QF1004: strings.Replace(…, -1)strings.ReplaceAll (exact equivalent).

All fixes behavior-preserving; no DB error handling / control flow altered.

Note — ST1012 suppressed, not renamed

staticcheck wants the exported RestrictedReadAccounts var renamed to the Err… convention. That's an exported identifier in a foundational module consumed by many services via go get, so renaming is a breaking API change. Suppressed with //nolint:staticcheck rather than renamed; a coordinated rename across consumers would be a separate ticket.

Jira Tickets

https://gudtech.atlassian.net/browse/ROP-9229

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
riccardo-perotti and others added 2 commits June 8, 2026 12:20
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@riccardo-perotti riccardo-perotti merged commit 65da001 into master Jun 8, 2026
2 checks passed
@riccardo-perotti riccardo-perotti deleted the rp.ROP-9229.install-golangci-lint-in-dbr-go branch June 8, 2026 17: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.

2 participants