csharplang
csharplang copied to clipboard
[Proposal]: #pragma warning *enable*
#pragma warning enable
- [x] Proposed
- [ ] Prototype: Not Started
- [ ] Implementation: Not Started
- [ ] Specification: Not Started
Summary
During our work on nullability in C# 8, we added support for #pragma warning enable ... as the mechanism to enable nullable warnings. Since we shipped with #nullable enable ... instead, we disabled that code with the intention to revisit later.
Motivation
Detailed design
Drawbacks
Alternatives
Unresolved questions
Design meetings
- LDM notes on disabling
#pragma warning enable ...in C# 8 timeframe: https://github.com/dotnet/csharplang/blob/7a42cf7d947082d73b4b5d92badbc21a860b652f/meetings/2019/LDM-2019-05-13.md#removing-support-for-pragma-warning-enable- - Relates to https://github.com/dotnet/roslyn/issues/36550 (roslyn issue to remove disabled code)
- https://github.com/dotnet/csharplang/blob/main/meetings/2022/LDM-2022-08-31.md#pragma-warning-enable
- https://github.com/dotnet/csharplang/blob/main/meetings/2022/LDM-2022-09-28.md#ungrouped
This proposal was rejected by the LDM: https://github.com/dotnet/csharplang/blob/main/meetings/2022/LDM-2022-09-28.md#ungrouped.