chore: DevKit compliance -- golangci-lint v2, LICENSE, pre-push hook - #50
Merged
Conversation
- Migrate .golangci.yml from v1 to v2 format - Add missing linters from DevKit standard (misspell, bodyclose, noctx, etc.) - Move gofmt/goimports to formatters section (v2 requirement) - Remove gosimple (merged into staticcheck in v2) - Add MIT LICENSE - Add pre-push hook with Go build, test, lint, and markdownlint checks Note: 24 pre-existing lint issues from new linters (exhaustive, gosec G602/G115, prealloc, staticcheck QF) to be addressed in a follow-up PR. Co-Authored-By: Claude <noreply@anthropic.com>
Action v6 rejects golangci-lint v2 config fields (version, formatters, linters.settings). Action v7 is required for v2 compatibility. Also removes install-mode: goinstall which doesn't work with v2. Co-Authored-By: Claude <noreply@anthropic.com>
5 tasks
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.
Summary
.golangci.ymlfrom v1 to v2 format (addsversion: "2", restructureslinters-settingstolinters.settings, movesissues.exclude-rulestolinters.exclusions.rules, movesgofmt/goimportstoformatterssection, removesgosimplewhich is merged intostaticcheckin v2)misspell,bodyclose,noctx,durationcheck,exhaustive,nilerrscripts/pre-pushcommitted copy +.git/hooks/pre-pushlocal copy) withgo build,go test,golangci-lint, andmarkdownlintchecksKnown Lint Issues (pre-existing, follow-up PR)
The new linters surface 24 pre-existing issues in project code:
exhaustive(missing enum cases in switches)gofmt(formatting in fifteenpuzzle)gosec(G602 slice bounds, G115 integer overflow)prealloc(slice preallocation)staticcheck(QF suggestions: fmt.Fprintf, De Morgan's law, tagged switch)These are intentionally NOT fixed in this PR to keep it scoped to infrastructure only.
Test plan
go build ./...passesgo test ./...passesgolangci-lint run ./...loads v2 config successfully (exits with pre-existing issues only)🤖 Generated with Claude Code