Skip to content

Commit 9940a51

Browse files
committed
Add missing pragma aliases for Tier 4 rules
🤖 Co-Authored-By: Claude Code <noreply@anthropic.com>
1 parent fc6a91e commit 9940a51

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

docs/rule-mappings.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ These rules use the Roslyn semantic model and are only active when the `--semant
8080

8181
| CsLint ID | Description | editorconfig Key | Third-Party IDs |
8282
|---|---|---|---|
83-
| CSLINT300 | Unused using directive | `dotnet_diagnostic.CSLINT300.severity` | CS8019 |
83+
| CSLINT300 | Unused using directive | `dotnet_diagnostic.CSLINT300.severity` | IDE0005, CS8019 |
8484
| CSLINT301 | Unused local variable | `dotnet_diagnostic.CSLINT301.severity` | CS0219 |
8585
| CSLINT302 | Unreachable code | `dotnet_diagnostic.CSLINT302.severity` | CS0162 |
86-
| CSLINT303 | Duplicate enum values | `dotnet_diagnostic.CSLINT303.severity` | -- |
87-
| CSLINT304 | Self-assignment | `dotnet_diagnostic.CSLINT304.severity` | -- |
86+
| CSLINT303 | Duplicate enum values | `dotnet_diagnostic.CSLINT303.severity` | CA1069 |
87+
| CSLINT304 | Self-assignment | `dotnet_diagnostic.CSLINT304.severity` | CS1717 |
8888
| CSLINT306 | Unnecessary cast | `dotnet_diagnostic.CSLINT306.severity` | IDE0004 |
8989
| CSLINT307 | Redundant await | `dotnet_diagnostic.CSLINT307.severity` | -- |
9090

@@ -141,7 +141,12 @@ The following third-party rule IDs are recognized in `#pragma warning disable` d
141141
| CA1821 | CSLINT237 | Microsoft |
142142
| CA1805 | CSLINT238 | Microsoft |
143143
| CA1852 | CSLINT239 | Microsoft |
144+
| IDE0004 | CSLINT306 | Microsoft |
145+
| IDE0005 | CSLINT300 | Microsoft |
146+
| CS0162 | CSLINT302 | C# compiler |
147+
| CS0219 | CSLINT301 | C# compiler |
144148
| CS1717 | CSLINT304 | C# compiler |
149+
| CA1069 | CSLINT303 | Microsoft |
145150

146151
## Future Candidates
147152

src/CsLint.Core/Engine/PragmaAliasMap.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,19 @@ internal static class PragmaAliasMap
7070
["IDE2004"] = ["CSLINT231"],
7171
["IDE2005"] = ["CSLINT232"],
7272
["IDE2006"] = ["CSLINT233"],
73+
["IDE0004"] = ["CSLINT306"],
74+
["IDE0005"] = ["CSLINT300"],
7375
["IDE0037"] = ["CSLINT234"],
7476
["IDE0075"] = ["CSLINT235"],
7577
["IDE0170"] = ["CSLINT236"],
7678

7779
// C# compiler
80+
["CS0162"] = ["CSLINT302"],
81+
["CS0219"] = ["CSLINT301"],
7882
["CS1717"] = ["CSLINT304"],
7983

8084
// Microsoft CA (code quality)
85+
["CA1069"] = ["CSLINT303"],
8186
["CA1821"] = ["CSLINT237"],
8287
["CA1805"] = ["CSLINT238"],
8388
["CA1852"] = ["CSLINT239"],

0 commit comments

Comments
 (0)