Skip to content

Commit 3a8ed8b

Browse files
authored
Add System.Text.RegularExpressions.Generator analyzers to .globalconfig (#121149)
- SYSLIB1040: Invalid GeneratedRegexAttribute usage - SYSLIB1041: Invalid GeneratedRegexAttribute usage - SYSLIB1042: Invalid GeneratedRegexAttribute usage - SYSLIB1043: Invalid GeneratedRegexAttribute usage - SYSLIB1044: Regex generator limitation reached.
1 parent cef4c32 commit 3a8ed8b

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

eng/CodeAnalysis.src.globalconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,21 @@ dotnet_diagnostic.BCL0015.severity = none
2121
# BCL0020: Invalid SR.Format call
2222
dotnet_diagnostic.BCL0020.severity = warning
2323

24+
# SYSLIB1040: Invalid GeneratedRegexAttribute usage
25+
dotnet_diagnostic.SYSLIB1040.severity = error
26+
27+
# SYSLIB1041: Invalid GeneratedRegexAttribute usage
28+
dotnet_diagnostic.SYSLIB1041.severity = error
29+
30+
# SYSLIB1042: Invalid GeneratedRegexAttribute usage
31+
dotnet_diagnostic.SYSLIB1042.severity = error
32+
33+
# SYSLIB1043: Invalid GeneratedRegexAttribute usage
34+
dotnet_diagnostic.SYSLIB1043.severity = error
35+
36+
# SYSLIB1044: Regex generator limitation reached.
37+
dotnet_diagnostic.SYSLIB1044.severity = warning
38+
2439
# SYSLIB1045: Convert to 'GeneratedRegexAttribute'.
2540
dotnet_diagnostic.SYSLIB1045.severity = warning
2641

eng/CodeAnalysis.test.globalconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,21 @@ dotnet_diagnostic.BCL0015.severity = none
2121
# BCL0020: Invalid SR.Format call
2222
dotnet_diagnostic.BCL0020.severity = none
2323

24+
# SYSLIB1040: Invalid GeneratedRegexAttribute usage
25+
dotnet_diagnostic.SYSLIB1040.severity = error
26+
27+
# SYSLIB1041: Invalid GeneratedRegexAttribute usage
28+
dotnet_diagnostic.SYSLIB1041.severity = error
29+
30+
# SYSLIB1042: Invalid GeneratedRegexAttribute usage
31+
dotnet_diagnostic.SYSLIB1042.severity = error
32+
33+
# SYSLIB1043: Invalid GeneratedRegexAttribute usage
34+
dotnet_diagnostic.SYSLIB1043.severity = error
35+
36+
# SYSLIB1044: Regex generator limitation reached.
37+
dotnet_diagnostic.SYSLIB1044.severity = none
38+
2439
# SYSLIB1045: Convert to 'GeneratedRegexAttribute'.
2540
dotnet_diagnostic.SYSLIB1045.severity = none
2641

0 commit comments

Comments
 (0)