Skip to content

chore: add golangci-lint, gofmt, and CI workflow#26

Merged
axelgar merged 5 commits into
mainfrom
chore/add-linter-formatter
Mar 11, 2026
Merged

chore: add golangci-lint, gofmt, and CI workflow#26
axelgar merged 5 commits into
mainfrom
chore/add-linter-formatter

Conversation

@axelgar

@axelgar axelgar commented Mar 11, 2026

Copy link
Copy Markdown
Owner

Changes - chore: add golangci-lint, gofmt, and

Test User and others added 5 commits March 11, 2026 10:17
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>
@axelgar axelgar merged commit dcb082c into main Mar 11, 2026
2 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