You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds .rb support to the post-edit diagnostics feedback loop in src/tools/diagnostics.ts. Follows the existing Python branch pattern
exactly — checks onPath("rubocop") before running, returns null
silently when rubocop is absent, never throws, never blocks.
🤖 KlaatAI Review Bot (powered by Klaatu, advisory only — a maintainer makes the real call)
Issue match
Fully addresses issue #1. It adds the exact .rb branch in commandFor() using the requested rubocop arguments and correctly follows the existing Python pattern.
Test coverage src/tools/diagnostics.test.ts adds 5 tests covering the negative paths (rubocop absent, diagnostics disabled, empty commands config, non-.rb unaffected). It lacks coverage for the happy path where rubocop is actually on PATH. A missing test should mock onPath("rubocop") to return true and assert that commandFor returns the exact expected command array.
Correctness concerns
None. The logic in src/tools/diagnostics.ts:72-75 safely handles the missing binary via onPath(), uses the correct absPath, and will not throw or block.
Verdict
Ready to merge as-is, but flag to a human reviewer whether the lack of a mocked happy-path test for rubocop being present is acceptable for this PR.
This is an automated review to help triage faster, not a gate. Nothing here blocks merging.
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
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
Adds
.rbsupport to the post-edit diagnostics feedback loop insrc/tools/diagnostics.ts. Follows the existing Python branch patternexactly — checks
onPath("rubocop")before running, returns nullsilently when rubocop is absent, never throws, never blocks.
Linked issue
Refs #1
How I verified it
bun run typecheck— no type errorsbun test— 47/47 passing across 8 files, 0 failuresbun run build— clean build (0.34 MB, 70 modules)