Skip to content

Enable 13 more linters and fix all violations#4997

Open
denik wants to merge 4 commits intomainfrom
denik/more-linters
Open

Enable 13 more linters and fix all violations#4997
denik wants to merge 4 commits intomainfrom
denik/more-linters

Conversation

@denik
Copy link
Copy Markdown
Contributor

@denik denik commented Apr 16, 2026

Changes

  • Enable 13 additional golangci-lint linters and fix all violations. Intentional patterns (e.g. deliberate nil-error returns) are annotated with //nolint.
  • Fix IPv6-unsafe host:port formatting in apps run-local config (fmt.Sprintfnet.JoinHostPort).
  • Fix user-facing typos: "paramaters" → "parameters", "app app proxy" → "app proxy".
  • Drop wastedassign linter — fully redundant with the already-enabled ineffassign.

Why

Follow-up to #4978. These linters catch real bugs at compile time (silently discarded errors, IPv6 breakage) and prevent future regressions.

Tests

No new tests. Validated with golangci-lint run ./.... One existing test assertion updated to match a corrected error string.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 16, 2026

Approval status: pending

/bundle/ - needs approval

19 files changed
Suggested: @pietern
Also eligible: @andrewnester, @shreyas-goenka, @lennartkats-db, @anton-107, @janniklasrose

/cmd/apps/ - needs approval

Files: cmd/apps/run_local.go
Suggested: @MarioCadenas
Also eligible: @pkosiec, @fjakobs, @jamesbroadhead, @Shridhad, @atilafassina, @keugenek, @arsenyinfo, @igrekun, @pffigueiredo, @ditadi, @calvarjorge

/cmd/auth/ - needs approval

Files: cmd/auth/describe.go
Suggested: @simonfaltum
Also eligible: @mihaimitrea-db, @tanmay-db, @tejaskochar-db, @hectorcast-db, @renaudhartert-db, @parthban-db, @Divyansh-db, @chrisst, @rauchy

/cmd/root/ - needs approval

Files: cmd/root/user_agent_command.go
Suggested: @simonfaltum
Also eligible: @mihaimitrea-db, @tanmay-db, @tejaskochar-db, @hectorcast-db, @renaudhartert-db, @parthban-db, @Divyansh-db, @chrisst, @rauchy

/integration/ - needs approval

Files: integration/libs/locker/locker_test.go
Suggested: @simonfaltum
Also eligible: @mihaimitrea-db, @tanmay-db, @tejaskochar-db, @hectorcast-db, @renaudhartert-db, @parthban-db, @Divyansh-db, @chrisst, @rauchy

/internal/ - needs approval

Files: internal/testcli/runner.go
Suggested: @simonfaltum
Also eligible: @mihaimitrea-db, @tanmay-db, @tejaskochar-db, @hectorcast-db, @renaudhartert-db, @parthban-db, @Divyansh-db, @chrisst, @rauchy

/libs/apps/ - needs approval

6 files changed
Suggested: @MarioCadenas
Also eligible: @pkosiec, @fjakobs, @jamesbroadhead, @Shridhad, @atilafassina, @keugenek, @arsenyinfo, @igrekun, @pffigueiredo, @ditadi, @calvarjorge

/libs/databrickscfg/ - needs approval

Files: libs/databrickscfg/ops.go
Suggested: @simonfaltum
Also eligible: @mihaimitrea-db, @tanmay-db, @tejaskochar-db, @hectorcast-db, @renaudhartert-db, @parthban-db, @Divyansh-db, @chrisst, @rauchy

/libs/env/ - needs approval

Files: libs/env/context.go
Suggested: @simonfaltum
Also eligible: @mihaimitrea-db, @tanmay-db, @tejaskochar-db, @hectorcast-db, @renaudhartert-db, @parthban-db, @Divyansh-db, @chrisst, @rauchy

/libs/filer/ - needs approval

Files: libs/filer/workspace_files_client.go
Suggested: @simonfaltum
Also eligible: @mihaimitrea-db, @tanmay-db, @tejaskochar-db, @hectorcast-db, @renaudhartert-db, @parthban-db, @Divyansh-db, @chrisst, @rauchy

/libs/git/ - needs approval

Files: libs/git/config_test.go
Suggested: @simonfaltum
Also eligible: @mihaimitrea-db, @tanmay-db, @tejaskochar-db, @hectorcast-db, @renaudhartert-db, @parthban-db, @Divyansh-db, @chrisst, @rauchy

/libs/log/ - needs approval

Files: libs/log/handler/friendly.go
Suggested: @simonfaltum
Also eligible: @mihaimitrea-db, @tanmay-db, @tejaskochar-db, @hectorcast-db, @renaudhartert-db, @parthban-db, @Divyansh-db, @chrisst, @rauchy

/libs/process/ - needs approval

Files: libs/process/stub.go
Suggested: @simonfaltum
Also eligible: @mihaimitrea-db, @tanmay-db, @tejaskochar-db, @hectorcast-db, @renaudhartert-db, @parthban-db, @Divyansh-db, @chrisst, @rauchy

/libs/sync/ - needs approval

Files: libs/sync/diff.go, libs/sync/snapshot.go, libs/sync/snapshot_state.go
Suggested: @simonfaltum
Also eligible: @mihaimitrea-db, @tanmay-db, @tejaskochar-db, @hectorcast-db, @renaudhartert-db, @parthban-db, @Divyansh-db, @chrisst, @rauchy

/libs/template/ - needs approval

Files: libs/template/config.go
Suggested: @pietern
Also eligible: @andrewnester, @shreyas-goenka, @lennartkats-db, @anton-107, @janniklasrose

General files (require maintainer)

22 files changed
Based on git history:

  • @pietern -- recent work in bundle/config/mutator/, ./, cmd/auth/

Any maintainer (@andrewnester, @anton-107, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db) can approve all areas.
See OWNERS for ownership rules.

@denik denik force-pushed the denik/more-linters branch from 98f7d56 to 1d1dd82 Compare April 19, 2026 12:13
denik added 4 commits April 19, 2026 13:44
Add dupword, misspell, nilerr, fatcontext, wastedassign,
nosprintfhostport, recvcheck, usetesting, nilnesserr, durationcheck,
exptostd, gocheckcompilerdirectives, asciicheck, and reassign linters
to .golangci.yaml. Fix all violations: spelling typos and duplicate
words in comments and string literals across the codebase.

Co-authored-by: Isaac
Use net.JoinHostPort in runlocal config to correctly handle IPv6
addresses. Remove wastedassign linter since it's fully redundant
with the already-enabled ineffassign linter.

Task: 002.md

Co-authored-by: Isaac
The initial commit only ran make lint (changed files). Running the full
lint suite revealed 40 pre-existing violations:
- nilerr (15): add //nolint with reasons for intentional error swallowing
- recvcheck (11): add //nolint for intentional mixed receivers
- usetesting (11): use t.TempDir()/t.Setenv() where safe, nolint where
  the os.* usage is intentional (KeepTmp, custom restore, Windows workaround)
- fatcontext (3): add //nolint for false positives (same-parent contexts)

Task: 002.md

Co-authored-by: Isaac
The nolint directive must be on the line where the issue is reported
(the return statement), not on the if statement.

Task: 002.md

Co-authored-by: Isaac
@denik denik force-pushed the denik/more-linters branch from 1d1dd82 to 981ef4b Compare April 19, 2026 13:44
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