-
-
Notifications
You must be signed in to change notification settings - Fork 523
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
fix: allow empty result from changed vcs files #1776
Conversation
✅ Deploy Preview for biomejs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
This looks good to me, I am happy to merge it whenever you want
It doesn't actually fix the issue, and returns an other error:
It seems to be returned at the start of |
In my opinion this check should instead be done at the parsing level if possible, for example in
unless there are cases where it's ok to have no path? Wdyt? |
b7b96c5
to
60eeb88
Compare
I've updated the PR with a new proposal It slightly changes the output if there is no provided path, as it's directly validated by Error: No path was provided instead of flags/invalid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Missing argument <INPUT> and it does fix the issue this time 🎉 |
There's a case, which is when users need/want to process files via standard in. |
Well, it breaks tests that make use of I guess this check:
must stay somewhere |
60eeb88
to
2afa1d5
Compare
I've updated the PR with the most straightforward solution, which allows empty paths if inputs.is_empty() && execution.as_stdin_file().is_none() to inputs.is_empty() && execution.as_stdin_file().is_none() && !cli_options.no_errors_on_unmatched It fixes the issue, but I'm not sure it's acceptable |
@@ -24,9 +24,5 @@ pub(crate) fn get_changed_files( | |||
|
|||
let filtered_changed_files = changed_files.iter().map(OsString::from).collect::<Vec<_>>(); | |||
|
|||
if filtered_changed_files.is_empty() { |
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.
I believe this check should stay, but we need to add the check if no_errors_on_unmatched
is true
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.
I've re-added this check, but now it's done twice - once here, and once in traverse.rs
60e6940
to
eef046a
Compare
eef046a
to
047c8b1
Compare
Is there anything else preventing it from being merged? |
A test plan :) |
I have it too and it prevents me from integrating Biome to the company sadly. will wait |
In the same boat with @ItamarShDev |
Summary
Allow an empty result when checking for changed files, which can later be allowed or not depending on the
--no-errors-on-unmatched
flagFixes #1774
Test Plan
To be done