chore: add test coverage to 90.3%, lint fixes, and Makefile targets #91

Merged
wbtiger merged 1 commits from muel/gitlink-cli:chore/test-coverage-and-lint into master 2026-05-31 15:41:34 +08:00
Member

Summary

  • Add comprehensive unit tests across all packages (733 tests, 90.3% total coverage, up from 52.4%)
  • Add Makefile targets: make lint, make cover, make fmt, make check
  • Fix staticcheck issues: unreachable code, redundant nil check, simplify bool expression
  • Fix unchecked error returns in render.go (writeCountMapMarkdown), runner.go, formatter.go
  • Add //nolint:errcheck for defer Close() calls (Go convention)
  • Fix gofmt formatting

Test plan

  • make check — fmt → vet → lint → test → cover all pass
  • go test ./... — 733 tests pass, all 22 packages
  • go test -coverprofile=coverage.out ./... — total 90.3%

? Generated with Claude Code

## Summary - Add comprehensive unit tests across all packages (733 tests, **90.3%** total coverage, up from 52.4%) - Add Makefile targets: `make lint`, `make cover`, `make fmt`, `make check` - Fix staticcheck issues: unreachable code, redundant nil check, simplify bool expression - Fix unchecked error returns in `render.go` (writeCountMapMarkdown), `runner.go`, `formatter.go` - Add `//nolint:errcheck` for defer Close() calls (Go convention) - Fix gofmt formatting ## Test plan - [x] `make check` — fmt → vet → lint → test → cover all pass - [x] `go test ./...` — 733 tests pass, all 22 packages - [x] `go test -coverprofile=coverage.out ./...` — total 90.3% ? Generated with [Claude Code](https://claude.com/claude-code)
wbtiger added 10 commits 2026-05-31 15:32:47 +08:00
693af7dd7a chore: add test coverage to 90.3%, lint fixes, and Makefile targets
- Add comprehensive unit tests across all packages (733 tests, 90.3% total coverage)
- Add make targets: lint, cover, fmt, check
- Fix staticcheck issues: unreachable code, redundant nil check, simplify bool expression
- Fix unchecked error returns in render.go (writeCountMapMarkdown), runner.go, formatter.go
- Add nolint:errcheck for defer Close() calls (Go convention)
- Fix gofmt formatting in cmd/root.go and render_test.go

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
wbtiger force-pushed chore/test-coverage-and-lint from 693af7dd7a to 0170b5b063 2026-05-31 15:41:30 +08:00 Compare
wbtiger merged commit 5a266867b5 into master 2026-05-31 15:41:34 +08:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Gitlink/gitlink-cli#91
No description provided.