Skip to content

feat: add Ruby diagnostics support via rubocop - #41

Merged
aakashrajput merged 1 commit into
KlaatAI:mainfrom
siddhanttiwari19:feat/ruby-rubocop-diagnostics
Jul 20, 2026
Merged

feat: add Ruby diagnostics support via rubocop#41
aakashrajput merged 1 commit into
KlaatAI:mainfrom
siddhanttiwari19:feat/ruby-rubocop-diagnostics

Conversation

@siddhanttiwari19

Copy link
Copy Markdown
Contributor

Summary

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.

Linked issue

Refs #1

How I verified it

  • bun run typecheck — no type errors
  • bun test — 47/47 passing across 8 files, 0 failures
  • bun run build — clean build (0.34 MB, 70 modules)

@github-actions

Copy link
Copy Markdown
Contributor

🤖 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.

@aakashrajput
aakashrajput merged commit d1b4082 into KlaatAI:main Jul 20, 2026
2 checks passed
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.

2 participants