[breaking change] dotnet format should return a nonzero exit code for unrecognized argument to --diagnostics
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
### Context
[`dotnet format`](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-format) is part of the .NET SDK starting .NET 6. One of its command line options is `--diagnostics`:
> `--diagnostics `
>
> A space-separated list of diagnostic IDs to use as a filter when fixing code style or third-party issues. Default value is whichever IDs are listed in the `.editorconfig` file.
### Proposed Solution
It should return `1` instead.
### Notes
- I don't know whether this is feasible because this requires all analyzers to report back whether they know about a particular diagnostic.
- I became aware of this inconsistent behavior because I was running `dotnet format --diagnostics IDE0290` on a machine that didn't have the .NET 8 SDK installed. 🤦
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.