Skip to content

feat(lint,covgate): add step timing output and --new-from-rev flag#21

Merged
ben-miru merged 4 commits into
mainfrom
feat/timing-and-new-from-rev
Apr 14, 2026
Merged

feat(lint,covgate): add step timing output and --new-from-rev flag#21
ben-miru merged 4 commits into
mainfrom
feat/timing-and-new-from-rev

Conversation

@ben-miru

Copy link
Copy Markdown
Contributor

Summary

  • Add per-step timing summaries to miru lint (custom linter, gofumpt, golangci-lint, deadcode) and per-package timing column + total to miru covgate, so users can identify CI bottlenecks at a glance.
  • Add --new-from-rev flag to miru lint, passed through to golangci-lint. This enables differential linting on PRs (--new-from-rev=origin/main) — the single biggest CI speedup opportunity (~7 min → seconds for small PRs).

Test plan

  • All existing tests pass (go test ./...)
  • New tests for fmtDuration, printTimings, timing output in RunLint, TIME column in covgate, and --new-from-rev flag wiring
  • Manual smoke test: go run ./cmd/miru lint --no-golangci --no-gofumpt shows timing section
  • Verify --new-from-rev=HEAD~1 passes through to golangci-lint correctly

🤖 Generated with Claude Code

ben-miru and others added 3 commits April 13, 2026 17:55
Add per-step timing summaries to both lint and covgate commands so
users can identify bottlenecks. Lint prints elapsed time for each
step (custom linter, gofumpt, golangci-lint, deadcode) plus total.
Covgate adds a TIME column to the per-package results table and
prints total elapsed time.

Add --new-from-rev flag to miru lint, passed through to golangci-lint
so CI can lint only changed code on PRs (--new-from-rev=origin/main).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cover fmtDuration, printTimings, timing summary in RunLint output,
TIME column in covgate output, Total time footer, and --new-from-rev
flag wiring in the command layer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ben-miru ben-miru force-pushed the feat/timing-and-new-from-rev branch 3 times, most recently from 83d990f to e2c5c8a Compare April 14, 2026 01:17
- Extract runLintSteps to keep RunLint under 50-line funclen limit
- Break long function signature to stay within 88-column line limit
- Collapse multi-line checkResult literals to single-line form
- Remove staticcheck-flagged test (redundant nil check on function)
- Run gofumpt on lint_test.go

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ben-miru ben-miru force-pushed the feat/timing-and-new-from-rev branch from e2c5c8a to f71d4f9 Compare April 14, 2026 01:18
@ben-miru ben-miru merged commit 3898fe8 into main Apr 14, 2026
2 checks passed
@ben-miru ben-miru deleted the feat/timing-and-new-from-rev branch April 14, 2026 01:21
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