Skip to content

chore: add mise, pre-commit, and lint tooling - #6

Merged
cxdy merged 3 commits into
mainfrom
chore/dev-tooling-mise-pre-commit
Jul 27, 2026
Merged

chore: add mise, pre-commit, and lint tooling#6
cxdy merged 3 commits into
mainfrom
chore/dev-tooling-mise-pre-commit

Conversation

@cxdy

@cxdy cxdy commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • mise: .tool-versions (Go, golangci-lint, pre-commit)
  • pre-commit: go-build/mod-tidy/test/fmt, commitizen, markdownlint-cli2, local golangci-lint
  • markdownlint + golangci configs (gosec noise exclusions for intentional CLI/hypervisor patterns)
  • commitizen (.cz.toml) for conventional commit-msg checks
  • just: init, lint, markdownlint, pre-commit, build-tray, coverage
  • Coverage: just coveragecoverage.xml (cobertura); CI uploads artifact; coverage-comment.yml posts PR table (minimum 75%, cmd mains + tray CGO excluded)
  • Tests: large unit-test expansion (client, API, manager, hypervisor, agent, CLI helpers, daemon, guest, …)
  • Tray / release: systray is CGO-only so CGO_ENABLED=0 release builds succeed

How to test

just init
just test
just coverage   # fails under 75%
just lint
CGO_ENABLED=0 go build -o /tmp/grain ./cmd/grain

After merge

Re-cut a CLI release (v0.2.1) so GitHub Release assets exist (v0.2.0 tag exists but publish failed).

cxdy added 3 commits July 26, 2026 23:52
Introduce .tool-versions, pre-commit (go + commitizen + markdownlint +
golangci-lint), markdownlint config, and just init/lint/pre-commit
recipes. Fix release builds by making the tray CGO-only with a clear
stub when CGO is disabled.
Fix golangci-lint (errcheck, staticcheck, unused, gofmt, gosec config),
expand unit tests across client/API/manager/hypervisor/agent/CLI and peers,
and add just coverage + coverage-comment workflow (75% gate, cmd/tray excluded).
@cxdy
cxdy merged commit 42f7336 into main Jul 27, 2026
1 check passed
@cxdy
cxdy deleted the chore/dev-tooling-mise-pre-commit branch July 27, 2026 04:38
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