feat(lint,covgate): add step timing output and --new-from-rev flag#21
Merged
Conversation
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>
83d990f to
e2c5c8a
Compare
- 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>
e2c5c8a to
f71d4f9
Compare
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.
Summary
miru lint(custom linter, gofumpt, golangci-lint, deadcode) and per-package timing column + total tomiru covgate, so users can identify CI bottlenecks at a glance.--new-from-revflag tomiru 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
go test ./...)fmtDuration,printTimings, timing output inRunLint, TIME column in covgate, and--new-from-revflag wiringgo run ./cmd/miru lint --no-golangci --no-gofumptshows timing section--new-from-rev=HEAD~1passes through to golangci-lint correctly🤖 Generated with Claude Code