feat(cli): support file arguments in rs check - #453
Conversation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cca07464fa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ); | ||
| await runFmtCLI(['--check'], { fixCommand: 'rs fmt', loadedConfig }); | ||
| await runFmtCLI(['--check', ...fileArgs], { | ||
| fixCommand: 'rs fmt', |
There was a problem hiding this comment.
Preserve selected paths in the formatter fix hint
When rs check <files...> finds a formatting issue, this hard-coded hint tells the user to run unscoped rs fmt; following it formats every configured file, including files deliberately excluded from the check. Build the fix command from the same positional scope, preserving -- and safely quoting paths, so the suggested repair matches the newly scoped workflow.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in b2a5d56. The formatter hint now preserves -- and the original file scope, with shell-safe quoting for paths. Tests cover spaces, single quotes, and option-like filenames.
There was a problem hiding this comment.
Reverted this fix in 380cbe5. We plan to address the hint together with rs check --fix by telling users to rerun the same command with --fix, which preserves the original file scope without reconstructing shell arguments.
Deploying rstack-cli with
|
| Latest commit: |
380cbe5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://88e2815d.rstack-cli.pages.dev |
| Branch Preview URL: | https://chenjiahan-feat-check-file-a.rstack-cli.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2a5d564c9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This reverts commit b2a5d56.
Summary
rs checkpreviously only supported whole-project checks, which prevented callers from scoping the combined lint and format workflow. This PR accepts file and directory arguments, forwards the same scope to bothrs lintandrs fmt --check, and preserves option-like file names passed after--. It also updates CLI help, tests, and the English and Chinese documentation.