fix(cli): improve error messages when given incompatible arguments#6753
fix(cli): improve error messages when given incompatible arguments#6753
Conversation
🦋 Changeset detectedLatest commit: 7fcc483 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 |
| return Err(CliDiagnostic::incompatible_arguments( | ||
| "--suppress", | ||
| "--write", | ||
| "--write is used to write fixes, and --suppress is used to suppress diagnostics. Remove one of these arguments depending on what you want to do.", |
There was a problem hiding this comment.
I'm not even sure this should be considered an incompatibility anymore. Technically, --write is to write things on disk and by default if fixes rules/actions using their code fix action. However, if we use --suppress we tell Biome to change the default , and use the the suppression action.
What do you think?
We can change it later, it's just that seeing this message, made me think.
Not a blocker
There was a problem hiding this comment.
I agree, but I think it requires a little more scrutiny.
Summary
The error messages we provided previously in these cases resulted in some confusing error messages, particularly when
--sincewas provided without--changed. This fixes that.partially addresses #4225. I didn't link the issue in the changeset because the issue is primarily something different.
Test Plan
Updated snapshots.