Repository navigation
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 31 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (6)
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 |
e851aa8 to
8fa190d
Compare
8fa190d to
b109771
Compare
995a047 to
389b27d
Compare
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation and integration are sound; only a minor test-coverage gap remains.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds a ShellCheck-inspired rule detecting redundant echo command substitutions.
Changes:
- Implements and tests
bash/no-useless-echo. - Enables the rule in the recommended configuration.
- Adds rule documentation and README registration.
| File | Description |
|---|---|
src/rules/no-useless-echo.ts |
Implements detection logic. |
src/rules/no-useless-echo.spec.ts |
Adds RuleTester coverage. |
src/index.ts |
Registers and enables the rule. |
src/index.spec.ts |
Verifies rule exposure. |
README.md |
Adds the rule to the catalog. |
docs/rules/no-useless-echo.md |
Documents behavior and usage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@copilot address review comments. Be sure to add tests. |
Added the negated |
74ee27b to
beb554a
Compare
beb554a to
541faf4
Compare
541faf4 to
80483df
Compare
80483df to
1424070
Compare
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: nzakas <38546+nzakas@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1424070 to
f572af5
Compare

Adds
shell/no-useless-echo, which mirrors ShellCheck SC2116:cmd $(echo foo)is justcmd foo.Behavior
$(...)or backticks) whose body is exactly oneechocommand, not negated and with no redirects.echo's arguments, so$(echo -n foo)is reported too.$(echo a; echo b)), pipelines ($(echo foo | tr a-z A-Z)), or redirected echoes."error".Documentation
Adds
docs/rules/no-useless-echo.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
8 RuleTester cases and 5 documentation checks (233 total); build, lint, and format checks pass.
🤖 Generated with Claude Code
Stack created with GitHub Stacks CLI • Give Feedback 💬