chore: add golangci-lint, gofmt, and CI workflow#26
Merged
Conversation
Adds .golangci.yml config, Makefile fmt/lint/test/check targets, and a GitHub Actions CI workflow for linting and testing on PRs/main. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix errcheck: wrap defer syscall.Flock unlock with func() to capture return - Fix errcheck: assign fmt.Sscanf return values to blank identifiers - Fix staticcheck SA9003: drop empty if-err block, use blank identifier - Remove unused funcs checkPRStatusCmd and checkCIStatusCmd from tui/commands.go - Remove unused vars logoStyle and statusStyle from tui/styles.go - Fix gofmt formatting in agents.go, review.go, main.go - Fix worktree tests: rename default branch to "main" in initGitRepo so resolveBase succeeds in CI where git may default to "master" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Run gofmt -w across the entire codebase to fix remaining formatting violations flagged by the golangci-lint gofmt linter. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Run goimports -w -local github.com/axelgar/opentree to properly separate stdlib imports from third-party and local imports. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
goimports is a superset of gofmt and also handles import grouping, matching what golangci-lint enforces via the goimports linter. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Changes - chore: add golangci-lint, gofmt, and