Repository navigation
fix(docs): reject a directory argument without --json too - #333
Conversation
docs sections, section and verify rejected a directory only under --json. The default path crashed with IsADirectoryError and a traceback. The check now runs before the --json branch, so both paths exit 2 with the same 'Expected a file path' message. Fixes #315 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K5rAHJfvZyEEaUQghV7hCQ
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
Benchmark Results🔴 Regression detected — threshold: 30% scan-clean
scan-violations
fix-violations
cpu
import
Updated 2026-10-09 11:17 UTC |
📊 Test Coverage ReportCoverage: 88.40% 📥 Coverage XML available as artifact: |
Fixes #315.
Before (on
main): #330 added the directory check, but only inside the--jsonbranch. Without--json,docs sections <dir>,docs section <dir> Handdocs verify <dir>crashed with anIsADirectoryErrortraceback, exit 1.After: the existing check runs before the
--jsonbranch. Both paths exit 2 withExpected a file path: <dir>on stderr.Verification:
test_directory_argument_is_a_usage_error_without_json(3 cases) failed onmainand passes on this branch.test_cli_json_contract.pystill passes.uv run prek run --all-files: clean.uv run pytest: 2129 passed, 14 skipped.🤖 Generated with Claude Code
https://claude.ai/code/session_01K5rAHJfvZyEEaUQghV7hCQ
Generated by Claude Code