Skip to content

test: add end-to-end tests for recommended config - #15

Open
nzakas wants to merge 1 commit into
rule/no-unused-varsfrom
integration-tests
Open

nzakas wants to merge 1 commit into
rule/no-unused-varsfrom
integration-tests

Conversation

@nzakas

@nzakas nzakas commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Adds end-to-end tests that run several shipped rules together through ESLint's Linter. They live at the top of the stack because they need every rule to exist. No source files change in this PR.

What's included

tests/plugin.test.ts gains a "shipped rules" block that checks:

  • four rules report together on one script;
  • rules run from the recommended config;
  • a script with typical ShellCheck findings triggers no-unused-vars, require-cd-guard, require-read-r, and no-unquoted-expansions;
  • a well-written script produces zero messages under the recommended config. This catches false positives that single-rule tests miss.

tests/autofix.test.ts gains a multi-rule verifyAndFix test showing that fixes from different rules compose. The first pass turns `pwd` into $(pwd), and the second pass quotes it as "$(pwd)".

Testing

5 new tests (368 total); build, lint, and format checks pass.

🤖 Generated with Claude Code


Stack created with GitHub Stacks CLI • Give Feedback 💬

@nzakas
nzakas added this pull request to stack #16 September 18, 2026 15:00
@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b3ab3dbb-53c1-4aaf-96ba-6abdd3c1e680
📥 Commits

Reviewing files that changed from the base of the PR and between fad280b and 45e55b1.

📒 Files selected for processing (2)
  • tests/autofix.test.ts
  • tests/plugin.test.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nzakas
nzakas marked this pull request as ready for review September 18, 2026 15:02
@nzakas
nzakas force-pushed the integration-tests branch 2 times, most recently from 5e3dc11 to d3219c1 Compare September 22, 2026 19:56
@nzakas
nzakas requested a balanced review from Copilot September 28, 2026 18:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The tests correctly exercise multi-rule linting and autofix behavior without unresolved issues.

Review effort: Balanced
Findings: None

What changed in this PR

Adds end-to-end coverage for interactions among shipped Bash rules and the recommended ESLint configuration.

Changes:

  • Tests recommended-config reporting and clean scripts.
  • Verifies multiple rules and autofixes compose correctly.
File Description
tests/​plugin.test.ts Adds integration coverage for shipped rules and recommended configuration.
tests/​autofix.test.ts Tests composing fixes from multiple rules.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@nzakas
nzakas force-pushed the integration-tests branch from bcc9bf2 to 45e55b1 Compare October 6, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants