Skip to content

Add golangci-lint config enabling stricter linters - #4

Merged
andrew merged 2 commits into
mainfrom
add-golangci-config
May 22, 2026
Merged

Add golangci-lint config enabling stricter linters#4
andrew merged 2 commits into
mainfrom
add-golangci-config

Conversation

@andrew

@andrew andrew commented May 22, 2026

Copy link
Copy Markdown
Contributor

Enables the same linter set used across other git-pkgs applications (gocritic, gocognit, gocyclo, maintidx, dupl, mnd, unparam, ireturn, goconst, errcheck) and configures goconst to skip test files.

Note: this surfaces existing lint findings that will need fixing separately.

andrew added 2 commits May 22, 2026 11:27
Enables the same linter set used across other git-pkgs applications (gocritic, gocognit, gocyclo, maintidx, dupl, mnd, unparam, ireturn, goconst, errcheck) and configures goconst to skip test files.
The language registry, extension map, and basename map all key on the same set of lowercase language identifiers, so goconst flags every one. Ignore plain-lowercase strings (same approach as proxy) since these are data, not magic strings. Also extracts the fence-length clamp into a named maxFenceLen constant.
@andrew
andrew merged commit 87fe95a into main May 22, 2026
7 checks passed
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