Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 35 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (8)
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 |
add0728 to
34075ff
Compare
34075ff to
ec8d183
Compare
ec8d183 to
994b8f6
Compare
994b8f6 to
6e3fad6
Compare
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation, conservative fix behavior, registration, documentation, and tests are consistent and complete.
Review effort: Balanced
Findings: None
What changed in this PR
Adds the first Bash lint rule, discouraging legacy backtick command substitution.
Changes:
- Implements and registers
bash/no-backtickswith safe autofixing. - Adds rule, integration, metadata, and documentation tests.
- Documents configuration and rule behavior.
| File | Description |
|---|---|
src/rules/no-backticks.ts |
Implements reporting and autofixing. |
src/rules/no-backticks.spec.ts |
Tests rule behavior and fixes. |
src/index.ts |
Registers and recommends the rule. |
src/index.spec.ts |
Verifies registration and metadata. |
tests/autofix.test.ts |
Tests end-to-end autofixing. |
tests/rule-docs.test.ts |
Validates rule documentation examples. |
docs/rules/no-backticks.md |
Documents the rule. |
README.md |
Adds configuration and rules guidance. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
6e3fad6 to
fe64fa5
Compare
4afe1a3 to
cbbea92
Compare
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
cbbea92 to
ee025fe
Compare
Adds
shell/no-backticks, which mirrors ShellCheck SC2006: use$(...)instead of legacy backtick command substitution.Behavior
`cmd`to$(cmd). The fix is skipped when the substitution contains a backslash or a nested backtick, because escaping rules differ inside backticks and a textual rewrite could change the meaning."error".Also in this PR
This is the first rule in the stack, so besides registering the rule it:
index.spec.tscheck that every rule hasdocs,messages, andschemametadata, and thatmeta.docs.urlpoints at the rule's file indocs/rules;tests/rule-docs.test.ts, which checks every registered rule's doc: the title and description match the rule's metadata, the standard sections are present, every incorrect example is reported by the rule, and every correct example produces no messages;tests/autofix.test.ts.Every rule PR registers its rule in the same three places:
src/index.ts(therulesmap and the recommended config), the rule list insrc/index.spec.ts, and the README table. Each rule PR also adds the rule's doc indocs/rules.Documentation
Adds
docs/rules/no-backticks.md, following the format of the@eslint/json,@eslint/css, and@eslint/markdownrule docs: description, background, rule details with incorrect and correct examples, options, when not to use it, and the ShellCheck reference. The rule'smeta.docs.urlpoints at that file, and its README table entry links to it.Testing
verifyAndFixtest.170 tests total; build, lint, and format checks pass.
🤖 Generated with Claude Code
Stack created with GitHub Stacks CLI • Give Feedback 💬