-
-
Couldn't load subscription status.
- Fork 732
fix(cli): ignore missing paths from --changed #7817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: a9e0358 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis pull request fixes issue #4952 where the Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
crates/biome_cli/src/changed.rs (1)
31-49: The filtering logic correctly handles missing files.The existence check with fallback for relative paths should work well. However, for future maintainability, consider adding a brief comment explaining why filtering is necessary (e.g., "Filter out deleted/renamed files to prevent IO errors").
crates/biome_cli/tests/commands/lint.rs (1)
2324-2346: Test validates the fix correctly, but could be clearer.The assertion
result.is_err()expects a "no matched files" error rather than an internal IO error, which the snapshot should verify. To improve clarity, consider adding a comment explaining that the error is for "no files matched" rather than an IO error, distinguishing it from the bug being fixed.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
crates/biome_cli/tests/snapshots/main_commands_lint/should_skip_missing_changed_files.snapis excluded by!**/*.snapand included by**
📒 Files selected for processing (3)
.changeset/fix-changed-missing-paths.md(1 hunks)crates/biome_cli/src/changed.rs(2 hunks)crates/biome_cli/tests/commands/lint.rs(1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
.changeset/*.md
📄 CodeRabbit inference engine (CONTRIBUTING.md)
.changeset/*.md: In changesets, only use #### or ##### headers; other header levels are not allowed
Changesets should cover user-facing changes only; internal changes do not need changesets
Use past tense for what you did and present tense for current Biome behavior in changesets
When fixing a bug in a changeset, start with an issue link (e.g., “Fixed #1234: …”)
When referencing a rule or assist in a changeset, include a link to its page on the website
Include code blocks in changesets when applicable to illustrate changes
End every sentence in a changeset with a period
Files:
.changeset/fix-changed-missing-paths.md
crates/biome_*/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place core crates under /crates/biome_*/
Files:
crates/biome_cli/tests/commands/lint.rscrates/biome_cli/src/changed.rs
**/tests/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place test files under a tests/ directory in each crate
Files:
crates/biome_cli/tests/commands/lint.rs
**/*.rs
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.rs: Format Rust files before committing (e.g., viajust fwhich formats Rust)
Document rules, assists, and options with inline rustdoc in source
Files:
crates/biome_cli/tests/commands/lint.rscrates/biome_cli/src/changed.rs
🧬 Code graph analysis (1)
crates/biome_cli/tests/commands/lint.rs (3)
crates/biome_fs/src/fs/memory.rs (1)
default(37-49)crates/biome_cli/tests/main.rs (1)
run_cli(332-347)crates/biome_cli/tests/snap_test.rs (1)
assert_cli_snapshot(407-409)
🔇 Additional comments (1)
.changeset/fix-changed-missing-paths.md (1)
1-5: LGTM!The changeset follows all formatting guidelines and clearly documents the user-facing fix.
|
@coderabbitai generate docstrings |
✅ Actions performedInitiated docstring generation; will generate only if new commits exist. |
|
Note Docstrings generation - SUCCESS |
Docstrings generation was requested by @Drewsz. * #7817 (comment) The following files were modified: * `crates/biome_cli/src/changed.rs`
Summary
--changedresults to skip files that were deleted or renamed locally, preventing the internal IO error.Test Plan
cargo buildcargo test -p biome_cliDocs