Skip to content

test(staged): cover rs fmt integration - #127

Merged
chenjiahan merged 3 commits into
mainfrom
chenjiahan/test-staged-fmt-integration
Jul 31, 2026
Merged

test(staged): cover rs fmt integration#127
chenjiahan merged 3 commits into
mainfrom
chenjiahan/test-staged-fmt-integration

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

This PR adds an end-to-end Git fixture for passing staged files from rs staged to rs fmt. It covers filenames with spaces, explicit staged files ignored by .gitignore, define.fmt.ignorePatterns, Git index updates, and formatter failure propagation.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@chenjiahan, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 23839846-e35e-4826-9f21-b41a4fccef85

📥 Commits

Reviewing files that changed from the base of the PR and between 688d827 and 48ef6e2.

📒 Files selected for processing (1)
  • packages/rstack/tests/cli/staged/fmt.test.ts
📝 Walkthrough

Walkthrough

Added staged-format CLI integration tests. The tests create isolated temporary Git projects and invoke rs fmt on staged files. They verify formatting, Git index updates, ignore rules, filenames with spaces, formatter failure status, SyntaxError output, and unchanged invalid files.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies integration test coverage for the staged formatting workflow.
Description check ✅ Passed The description directly explains the end-to-end Git fixture and the behaviors covered by the tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chenjiahan/test-staged-fmt-integration

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.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/rstack/tests/cli/staged/fmt.test.ts`:
- Around line 42-48: Update the test environment setup around the env object to
remove inherited GIT_* variables, especially GIT_DIR, GIT_WORK_TREE, and
GIT_INDEX_FILE, before assigning the fixture-specific GIT_CONFIG_GLOBAL and
GIT_CONFIG_NOSYSTEM values. Preserve the existing process environment and color
settings while ensuring Git operates on projectPath.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e35a4abc-91ac-4518-8ba4-af746a8ff638

📥 Commits

Reviewing files that changed from the base of the PR and between db33067 and 688d827.

📒 Files selected for processing (1)
  • packages/rstack/tests/cli/staged/fmt.test.ts

Comment thread packages/rstack/tests/cli/staged/fmt.test.ts Outdated
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deploying rstack-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: 48ef6e2
Status: ✅  Deploy successful!
Preview URL: https://c9692af0.rstack-cli.pages.dev
Branch Preview URL: https://chenjiahan-test-staged-fmt-i.rstack-cli.pages.dev

View logs

@chenjiahan
chenjiahan merged commit 4507ca5 into main Jul 31, 2026
4 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/test-staged-fmt-integration branch July 31, 2026 09:38
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.

1 participant