From a3191a0e3b5c3e2bd81eedea33fd78feebbeee12 Mon Sep 17 00:00:00 2001 From: Josef Pihrt Date: Sat, 15 Aug 2026 12:30:32 +0200 Subject: [PATCH 1/5] Escalate repo-enforced code style diagnostics to warning. Make listed RCS rules and CI format checks fail at warning severity so contributors see style issues during local builds under TreatWarningsAsErrors. Co-authored-by: Cursor --- .claude/skills/add-analyzer/SKILL.md | 2 +- .../add-compiler-diagnostic-fix/SKILL.md | 2 +- .claude/skills/add-refactoring/SKILL.md | 2 +- .claude/skills/fix-analyzer-bug/SKILL.md | 2 +- .../references/release-and-ci.md | 2 +- .editorconfig | 178 +++++++++--------- .github/workflows/build.yml | 2 +- CONTRIBUTING.md | 2 +- ...ImplicitOrExplicitArrayCreationAnalysis.cs | 8 +- ...dStringToStringBuilderMethodRefactoring.cs | 14 +- 10 files changed, 107 insertions(+), 107 deletions(-) diff --git a/.claude/skills/add-analyzer/SKILL.md b/.claude/skills/add-analyzer/SKILL.md index e525a43076..6c319bac5a 100644 --- a/.claude/skills/add-analyzer/SKILL.md +++ b/.claude/skills/add-analyzer/SKILL.md @@ -52,7 +52,7 @@ Verify: cd tools && pwsh ./generate_code.ps1 cd src && dotnet build Roslynator.sln cd src && dotnet test Roslynator.sln --no-build --filter "FullyQualifiedName~RCS####" -cd src && dotnet format Roslynator.sln --no-restore --verify-no-changes --severity info +cd src && dotnet format Roslynator.sln --no-restore --verify-no-changes --severity warn ``` ## Common Mistakes diff --git a/.claude/skills/add-compiler-diagnostic-fix/SKILL.md b/.claude/skills/add-compiler-diagnostic-fix/SKILL.md index bc032abae2..735ac095b9 100644 --- a/.claude/skills/add-compiler-diagnostic-fix/SKILL.md +++ b/.claude/skills/add-compiler-diagnostic-fix/SKILL.md @@ -48,7 +48,7 @@ Verify: cd tools && pwsh ./generate_code.ps1 cd src && dotnet build Roslynator.sln cd src && dotnet test Tests/CodeFixes.Tests --no-build --filter "FullyQualifiedName~CS####" -cd src && dotnet format Roslynator.sln --no-restore --verify-no-changes --severity info +cd src && dotnet format Roslynator.sln --no-restore --verify-no-changes --severity warn ``` ## Common Mistakes diff --git a/.claude/skills/add-refactoring/SKILL.md b/.claude/skills/add-refactoring/SKILL.md index 892ee452c1..2e479c9d23 100644 --- a/.claude/skills/add-refactoring/SKILL.md +++ b/.claude/skills/add-refactoring/SKILL.md @@ -48,7 +48,7 @@ Verify: cd tools && pwsh ./generate_code.ps1 cd src && dotnet build Roslynator.sln cd src && dotnet test Tests/Refactorings.Tests --no-build --filter "FullyQualifiedName~RR####" -cd src && dotnet format Roslynator.sln --no-restore --verify-no-changes --severity info +cd src && dotnet format Roslynator.sln --no-restore --verify-no-changes --severity warn ``` ## Common Mistakes diff --git a/.claude/skills/fix-analyzer-bug/SKILL.md b/.claude/skills/fix-analyzer-bug/SKILL.md index 54c9e966dc..38f53258a1 100644 --- a/.claude/skills/fix-analyzer-bug/SKILL.md +++ b/.claude/skills/fix-analyzer-bug/SKILL.md @@ -51,7 +51,7 @@ Verify (adjust project and filter): cd src && dotnet build Roslynator.sln cd src && dotnet test Tests/Analyzers.Tests --no-build --filter "FullyQualifiedName~RCS####" cd src && dotnet test Tests/CodeFixes.Tests --no-build --filter "FullyQualifiedName~CS####" -cd src && dotnet format Roslynator.sln --no-restore --verify-no-changes --severity info +cd src && dotnet format Roslynator.sln --no-restore --verify-no-changes --severity warn ``` Changelog examples: [references/changelog-examples.md](references/changelog-examples.md). diff --git a/.claude/skills/release-roslynator/references/release-and-ci.md b/.claude/skills/release-roslynator/references/release-and-ci.md index 6d992a7e8b..0a2c334937 100644 --- a/.claude/skills/release-roslynator/references/release-and-ci.md +++ b/.claude/skills/release-roslynator/references/release-and-ci.md @@ -34,7 +34,7 @@ Most doc output lands in docs site repo, not roslynator. ```bash cd src && dotnet restore Roslynator.sln cd src && dotnet build Roslynator.sln --no-restore -cd src && dotnet format Roslynator.sln --no-restore --verify-no-changes --severity info +cd src && dotnet format Roslynator.sln --no-restore --verify-no-changes --severity warn cd src && dotnet test Roslynator.sln --no-build ``` diff --git a/.editorconfig b/.editorconfig index f9ecc06957..726ac8b993 100644 --- a/.editorconfig +++ b/.editorconfig @@ -62,7 +62,7 @@ csharp_preserve_single_line_blocks = true dotnet_sort_system_directives_first = true -csharp_style_namespace_declarations = file_scoped:suggestion +csharp_style_namespace_declarations = file_scoped:warning roslynator_accessibility_modifiers = explicit roslynator_accessor_braces_style = single_line_when_expression_is_on_single_line @@ -100,108 +100,108 @@ roslynator_use_collection_expression = true roslynator_blank_line_between_switch_sections = omit roslynator_use_var = when_type_is_obvious -dotnet_diagnostic.RCS0001.severity = suggestion -dotnet_diagnostic.RCS0003.severity = suggestion -dotnet_diagnostic.RCS0004.severity = suggestion -dotnet_diagnostic.RCS0006.severity = suggestion -dotnet_diagnostic.RCS0011.severity = suggestion -dotnet_diagnostic.RCS0013.severity = suggestion -dotnet_diagnostic.RCS0015.severity = suggestion -dotnet_diagnostic.RCS0016.severity = suggestion -dotnet_diagnostic.RCS0020.severity = suggestion -dotnet_diagnostic.RCS0021.severity = suggestion -dotnet_diagnostic.RCS0022.severity = suggestion -dotnet_diagnostic.RCS0023.severity = suggestion -dotnet_diagnostic.RCS0024.severity = suggestion -dotnet_diagnostic.RCS0025.severity = suggestion -dotnet_diagnostic.RCS0027.severity = suggestion -dotnet_diagnostic.RCS0028.severity = suggestion -dotnet_diagnostic.RCS0030.severity = suggestion -dotnet_diagnostic.RCS0031.severity = suggestion -dotnet_diagnostic.RCS0032.severity = suggestion -dotnet_diagnostic.RCS0033.severity = suggestion -dotnet_diagnostic.RCS0038.severity = suggestion -dotnet_diagnostic.RCS0039.severity = suggestion -dotnet_diagnostic.RCS0041.severity = suggestion -dotnet_diagnostic.RCS0042.severity = suggestion -dotnet_diagnostic.RCS0046.severity = suggestion +dotnet_diagnostic.RCS0001.severity = warning +dotnet_diagnostic.RCS0003.severity = warning +dotnet_diagnostic.RCS0004.severity = warning +dotnet_diagnostic.RCS0006.severity = warning +dotnet_diagnostic.RCS0011.severity = warning +dotnet_diagnostic.RCS0013.severity = warning +dotnet_diagnostic.RCS0015.severity = warning +dotnet_diagnostic.RCS0016.severity = warning +dotnet_diagnostic.RCS0020.severity = warning +dotnet_diagnostic.RCS0021.severity = warning +dotnet_diagnostic.RCS0022.severity = warning +dotnet_diagnostic.RCS0023.severity = warning +dotnet_diagnostic.RCS0024.severity = warning +dotnet_diagnostic.RCS0025.severity = warning +dotnet_diagnostic.RCS0027.severity = warning +dotnet_diagnostic.RCS0028.severity = warning +dotnet_diagnostic.RCS0030.severity = warning +dotnet_diagnostic.RCS0031.severity = warning +dotnet_diagnostic.RCS0032.severity = warning +dotnet_diagnostic.RCS0033.severity = warning +dotnet_diagnostic.RCS0038.severity = warning +dotnet_diagnostic.RCS0039.severity = warning +dotnet_diagnostic.RCS0041.severity = warning +dotnet_diagnostic.RCS0042.severity = warning +dotnet_diagnostic.RCS0046.severity = warning dotnet_diagnostic.RCS0048.severity = silent -dotnet_diagnostic.RCS0049.severity = suggestion -dotnet_diagnostic.RCS0050.severity = suggestion -dotnet_diagnostic.RCS0051.severity = suggestion -dotnet_diagnostic.RCS0053.severity = suggestion -dotnet_diagnostic.RCS0054.severity = suggestion -dotnet_diagnostic.RCS0055.severity = suggestion +dotnet_diagnostic.RCS0049.severity = warning +dotnet_diagnostic.RCS0050.severity = warning +dotnet_diagnostic.RCS0051.severity = warning +dotnet_diagnostic.RCS0053.severity = warning +dotnet_diagnostic.RCS0054.severity = warning +dotnet_diagnostic.RCS0055.severity = warning dotnet_diagnostic.RCS0056.severity = none -dotnet_diagnostic.RCS0057.severity = suggestion -dotnet_diagnostic.RCS0058.severity = suggestion -dotnet_diagnostic.RCS0059.severity = suggestion -dotnet_diagnostic.RCS0060.severity = suggestion -dotnet_diagnostic.RCS0061.severity = suggestion +dotnet_diagnostic.RCS0057.severity = warning +dotnet_diagnostic.RCS0058.severity = warning +dotnet_diagnostic.RCS0059.severity = warning +dotnet_diagnostic.RCS0060.severity = warning +dotnet_diagnostic.RCS0061.severity = warning dotnet_diagnostic.RCS1002.severity = silent -dotnet_diagnostic.RCS1006.severity = suggestion +dotnet_diagnostic.RCS1006.severity = warning dotnet_diagnostic.RCS1008.severity = none dotnet_diagnostic.RCS1009.severity = none dotnet_diagnostic.RCS1010.severity = none -dotnet_diagnostic.RCS1013.severity = suggestion -dotnet_diagnostic.RCS1014.severity = suggestion -dotnet_diagnostic.RCS1016.severity = suggestion -dotnet_diagnostic.RCS1017.severity = suggestion +dotnet_diagnostic.RCS1013.severity = warning +dotnet_diagnostic.RCS1014.severity = warning +dotnet_diagnostic.RCS1016.severity = warning +dotnet_diagnostic.RCS1017.severity = warning dotnet_diagnostic.RCS1018.severity = warning -dotnet_diagnostic.RCS1019.severity = suggestion -dotnet_diagnostic.RCS1034.severity = suggestion +dotnet_diagnostic.RCS1019.severity = warning +dotnet_diagnostic.RCS1034.severity = warning dotnet_diagnostic.RCS1037.severity = warning -dotnet_diagnostic.RCS1039.severity = suggestion -dotnet_diagnostic.RCS1040.severity = suggestion -dotnet_diagnostic.RCS1042.severity = suggestion -dotnet_diagnostic.RCS1043.severity = suggestion +dotnet_diagnostic.RCS1039.severity = warning +dotnet_diagnostic.RCS1040.severity = warning +dotnet_diagnostic.RCS1042.severity = warning +dotnet_diagnostic.RCS1043.severity = warning dotnet_diagnostic.RCS1045.severity = warning -dotnet_diagnostic.RCS1050.severity = suggestion -dotnet_diagnostic.RCS1051.severity = suggestion -dotnet_diagnostic.RCS1060.severity = suggestion -dotnet_diagnostic.RCS1061.severity = suggestion -dotnet_diagnostic.RCS1062.severity = suggestion -dotnet_diagnostic.RCS1066.severity = suggestion -dotnet_diagnostic.RCS1069.severity = suggestion -dotnet_diagnostic.RCS1070.severity = suggestion -dotnet_diagnostic.RCS1071.severity = suggestion -dotnet_diagnostic.RCS1074.severity = suggestion +dotnet_diagnostic.RCS1050.severity = warning +dotnet_diagnostic.RCS1051.severity = warning +dotnet_diagnostic.RCS1060.severity = warning +dotnet_diagnostic.RCS1061.severity = warning +dotnet_diagnostic.RCS1062.severity = warning +dotnet_diagnostic.RCS1066.severity = warning +dotnet_diagnostic.RCS1069.severity = warning +dotnet_diagnostic.RCS1070.severity = warning +dotnet_diagnostic.RCS1071.severity = warning +dotnet_diagnostic.RCS1074.severity = warning dotnet_diagnostic.RCS1076.severity = none -dotnet_diagnostic.RCS1078.severity = suggestion -dotnet_diagnostic.RCS1079.severity = suggestion -dotnet_diagnostic.RCS1081.severity = suggestion -dotnet_diagnostic.RCS1082.severity = suggestion -dotnet_diagnostic.RCS1083.severity = suggestion -dotnet_diagnostic.RCS1090.severity = suggestion -dotnet_diagnostic.RCS1091.severity = suggestion +dotnet_diagnostic.RCS1078.severity = warning +dotnet_diagnostic.RCS1079.severity = warning +dotnet_diagnostic.RCS1081.severity = warning +dotnet_diagnostic.RCS1082.severity = warning +dotnet_diagnostic.RCS1083.severity = warning +dotnet_diagnostic.RCS1090.severity = warning +dotnet_diagnostic.RCS1091.severity = warning dotnet_diagnostic.RCS1096.severity = warning -dotnet_diagnostic.RCS1124.severity = suggestion +dotnet_diagnostic.RCS1124.severity = warning dotnet_diagnostic.RCS1126.severity = warning -dotnet_diagnostic.RCS1129.severity = suggestion -dotnet_diagnostic.RCS1133.severity = suggestion -dotnet_diagnostic.RCS1134.severity = suggestion -dotnet_diagnostic.RCS1136.severity = suggestion -dotnet_diagnostic.RCS1138.severity = suggestion -dotnet_diagnostic.RCS1139.severity = suggestion -dotnet_diagnostic.RCS1143.severity = suggestion -dotnet_diagnostic.RCS1145.severity = suggestion -dotnet_diagnostic.RCS1151.severity = suggestion -dotnet_diagnostic.RCS1162.severity = suggestion -dotnet_diagnostic.RCS1188.severity = suggestion -dotnet_diagnostic.RCS1189.severity = suggestion -dotnet_diagnostic.RCS1207.severity = suggestion -dotnet_diagnostic.RCS1228.severity = suggestion +dotnet_diagnostic.RCS1129.severity = warning +dotnet_diagnostic.RCS1133.severity = warning +dotnet_diagnostic.RCS1134.severity = warning +dotnet_diagnostic.RCS1136.severity = warning +dotnet_diagnostic.RCS1138.severity = warning +dotnet_diagnostic.RCS1139.severity = warning +dotnet_diagnostic.RCS1143.severity = warning +dotnet_diagnostic.RCS1145.severity = warning +dotnet_diagnostic.RCS1151.severity = warning +dotnet_diagnostic.RCS1162.severity = warning +dotnet_diagnostic.RCS1188.severity = warning +dotnet_diagnostic.RCS1189.severity = warning +dotnet_diagnostic.RCS1207.severity = warning +dotnet_diagnostic.RCS1228.severity = warning dotnet_diagnostic.RCS1237.severity = none -dotnet_diagnostic.RCS1244.severity = suggestion -dotnet_diagnostic.RCS1248.severity = suggestion -dotnet_diagnostic.RCS1250.severity = suggestion -dotnet_diagnostic.RCS1252.severity = suggestion -dotnet_diagnostic.RCS1253.severity = suggestion -dotnet_diagnostic.RCS1254.severity = suggestion +dotnet_diagnostic.RCS1244.severity = warning +dotnet_diagnostic.RCS1248.severity = warning +dotnet_diagnostic.RCS1250.severity = warning +dotnet_diagnostic.RCS1252.severity = warning +dotnet_diagnostic.RCS1253.severity = warning +dotnet_diagnostic.RCS1254.severity = warning dotnet_diagnostic.RCS1255.severity = none -dotnet_diagnostic.RCS1260.severity = suggestion -dotnet_diagnostic.RCS1264.severity = suggestion -dotnet_diagnostic.RCS9001.severity = suggestion +dotnet_diagnostic.RCS1260.severity = warning +dotnet_diagnostic.RCS1264.severity = warning +dotnet_diagnostic.RCS9001.severity = warning dotnet_diagnostic.IDE0007.severity = none dotnet_diagnostic.IDE0007WithoutSuggestion.severity = none diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 45f68d7b17..b6dba22c3f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,7 +59,7 @@ jobs: - run: dotnet restore Roslynator.sln - run: dotnet build Roslynator.sln --no-restore - run: | - dotnet format Roslynator.sln --no-restore --verify-no-changes --severity info + dotnet format Roslynator.sln --no-restore --verify-no-changes --severity warn - run: dotnet test Roslynator.sln --no-build - uses: actions/checkout@v4 with: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e29a8e3acd..d3fb6ed766 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,4 +42,4 @@ More context: [Contributing with agent skills](https://josefpihrt.github.io/docs ## Coding Style * **DO** follow [.NET Runtime Coding Style](https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/coding-style.md) (except using `s_` and `t_` prefix for field names). -* **DO** install the Roslynator extension for Visual Studio or VS Code and follow its suggestions. +* **DO** install the Roslynator extension for Visual Studio or VS Code and follow its warnings (enforced by the build via `.editorconfig`). diff --git a/src/Analyzers/CSharp/Analysis/ObjectCreation/ImplicitOrExplicitArrayCreationAnalysis.cs b/src/Analyzers/CSharp/Analysis/ObjectCreation/ImplicitOrExplicitArrayCreationAnalysis.cs index 0c10d735bf..5caa68bd7f 100644 --- a/src/Analyzers/CSharp/Analysis/ObjectCreation/ImplicitOrExplicitArrayCreationAnalysis.cs +++ b/src/Analyzers/CSharp/Analysis/ObjectCreation/ImplicitOrExplicitArrayCreationAnalysis.cs @@ -197,10 +197,10 @@ private bool AnalyzeExplicit(ref SyntaxNodeAnalysisContext context, bool isObvio #endif if (isObvious || IsInitializerObvious(ref context)) - { - ReportExplicitToImplicit(ref context); - return true; - } + { + ReportExplicitToImplicit(ref context); + return true; + } } return false; diff --git a/src/Workspaces.Common/CSharp/Refactorings/ConvertInterpolatedStringToStringBuilderMethodRefactoring.cs b/src/Workspaces.Common/CSharp/Refactorings/ConvertInterpolatedStringToStringBuilderMethodRefactoring.cs index 81de2a75db..ab51bb26f0 100644 --- a/src/Workspaces.Common/CSharp/Refactorings/ConvertInterpolatedStringToStringBuilderMethodRefactoring.cs +++ b/src/Workspaces.Common/CSharp/Refactorings/ConvertInterpolatedStringToStringBuilderMethodRefactoring.cs @@ -89,13 +89,13 @@ public static (SyntaxKind contentKind, string methodName, ImmutableArray Date: Sat, 15 Aug 2026 13:00:28 +0200 Subject: [PATCH 2/5] Revert preprocessor-region whitespace to match CI formatting. Local dotnet format and CI disagree on indentation around #endif for ROSLYN_* defines; keep the layout CI expects. Co-authored-by: Cursor --- .../ImplicitOrExplicitArrayCreationAnalysis.cs | 8 ++++---- ...olatedStringToStringBuilderMethodRefactoring.cs | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Analyzers/CSharp/Analysis/ObjectCreation/ImplicitOrExplicitArrayCreationAnalysis.cs b/src/Analyzers/CSharp/Analysis/ObjectCreation/ImplicitOrExplicitArrayCreationAnalysis.cs index 5caa68bd7f..0c10d735bf 100644 --- a/src/Analyzers/CSharp/Analysis/ObjectCreation/ImplicitOrExplicitArrayCreationAnalysis.cs +++ b/src/Analyzers/CSharp/Analysis/ObjectCreation/ImplicitOrExplicitArrayCreationAnalysis.cs @@ -197,10 +197,10 @@ private bool AnalyzeExplicit(ref SyntaxNodeAnalysisContext context, bool isObvio #endif if (isObvious || IsInitializerObvious(ref context)) - { - ReportExplicitToImplicit(ref context); - return true; - } + { + ReportExplicitToImplicit(ref context); + return true; + } } return false; diff --git a/src/Workspaces.Common/CSharp/Refactorings/ConvertInterpolatedStringToStringBuilderMethodRefactoring.cs b/src/Workspaces.Common/CSharp/Refactorings/ConvertInterpolatedStringToStringBuilderMethodRefactoring.cs index ab51bb26f0..81de2a75db 100644 --- a/src/Workspaces.Common/CSharp/Refactorings/ConvertInterpolatedStringToStringBuilderMethodRefactoring.cs +++ b/src/Workspaces.Common/CSharp/Refactorings/ConvertInterpolatedStringToStringBuilderMethodRefactoring.cs @@ -89,13 +89,13 @@ public static (SyntaxKind contentKind, string methodName, ImmutableArray Date: Sat, 15 Aug 2026 13:08:46 +0200 Subject: [PATCH 3/5] Fix TreatWarningsAsErrors fallout from severity escalation. Keep RCS9001 at suggestion (existing pattern-matching debt) and add ConfigureAwait(false) in the roslyn3.8 path of RawStringLiteralCodeFixProvider. Co-authored-by: Cursor --- .editorconfig | 2 +- .../CSharp/CodeFixes/RawStringLiteralCodeFixProvider.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index 726ac8b993..9364e95b61 100644 --- a/.editorconfig +++ b/.editorconfig @@ -201,7 +201,7 @@ dotnet_diagnostic.RCS1254.severity = warning dotnet_diagnostic.RCS1255.severity = none dotnet_diagnostic.RCS1260.severity = warning dotnet_diagnostic.RCS1264.severity = warning -dotnet_diagnostic.RCS9001.severity = warning +dotnet_diagnostic.RCS9001.severity = suggestion dotnet_diagnostic.IDE0007.severity = none dotnet_diagnostic.IDE0007WithoutSuggestion.severity = none diff --git a/src/Analyzers.CodeFixes/CSharp/CodeFixes/RawStringLiteralCodeFixProvider.cs b/src/Analyzers.CodeFixes/CSharp/CodeFixes/RawStringLiteralCodeFixProvider.cs index 9f44fdbf24..10a0a33ac1 100644 --- a/src/Analyzers.CodeFixes/CSharp/CodeFixes/RawStringLiteralCodeFixProvider.cs +++ b/src/Analyzers.CodeFixes/CSharp/CodeFixes/RawStringLiteralCodeFixProvider.cs @@ -84,7 +84,7 @@ public override async Task RegisterCodeFixesAsync(CodeFixContext context) } } #else - await Task.CompletedTask; + await Task.CompletedTask.ConfigureAwait(false); #endif } From ffbcd6c97f8380050bbef5eef325559f923dd7c4 Mon Sep 17 00:00:00 2001 From: Josef Pihrt Date: Sat, 15 Aug 2026 13:15:43 +0200 Subject: [PATCH 4/5] Fix RCS1264 in net48 CLI path for GitLab JSON serializer. Use an explicit SHA256 type under NETFRAMEWORK so TreatWarningsAsErrors succeeds on Windows framework CLI builds. Co-authored-by: Cursor --- src/CommandLine/Json/DiagnosticGitLabJsonSerializer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CommandLine/Json/DiagnosticGitLabJsonSerializer.cs b/src/CommandLine/Json/DiagnosticGitLabJsonSerializer.cs index 7b3805f3da..010a3512e6 100644 --- a/src/CommandLine/Json/DiagnosticGitLabJsonSerializer.cs +++ b/src/CommandLine/Json/DiagnosticGitLabJsonSerializer.cs @@ -64,7 +64,7 @@ public static void Serialize( byte[] source = Encoding.UTF8.GetBytes(issueFingerPrint); byte[] hashBytes; #if NETFRAMEWORK - using (var sha256 = SHA256.Create()) + using (SHA256 sha256 = SHA256.Create()) hashBytes = sha256.ComputeHash(source); #else hashBytes = SHA256.HashData(source); From fee9a1e417c3a5f639f0061f131de3556cde95d9 Mon Sep 17 00:00:00 2001 From: Josef Pihrt Date: Sun, 16 Aug 2026 17:18:40 +0200 Subject: [PATCH 5/5] Escalate enabled-by-default Info analyzers to warning in EditorConfig. Add explicit warning entries for product-default Info rules that were still at suggestion, so TreatWarningsAsErrors and format --severity warn enforce them. Leave RCS1163, RCS1213, and RCS9001 at suggestion due to multi-Roslyn TFM / #if debt. Co-authored-by: Cursor --- .editorconfig | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/.editorconfig b/.editorconfig index 9364e95b61..b44cb41ac0 100644 --- a/.editorconfig +++ b/.editorconfig @@ -203,6 +203,117 @@ dotnet_diagnostic.RCS1260.severity = warning dotnet_diagnostic.RCS1264.severity = warning dotnet_diagnostic.RCS9001.severity = suggestion +# Enabled-by-default Info analyzers escalated to warning for repo builds / format --severity warn. +# Exceptions left at suggestion (multi-Roslyn TFM / #if debt): RCS1163, RCS1213, RCS9001. +dotnet_diagnostic.RCS1001.severity = warning +dotnet_diagnostic.RCS1003.severity = warning +dotnet_diagnostic.RCS1015.severity = warning +dotnet_diagnostic.RCS1020.severity = warning +dotnet_diagnostic.RCS1021.severity = warning +dotnet_diagnostic.RCS1032.severity = warning +dotnet_diagnostic.RCS1033.severity = warning +dotnet_diagnostic.RCS1047.severity = warning +dotnet_diagnostic.RCS1048.severity = warning +dotnet_diagnostic.RCS1049.severity = warning +dotnet_diagnostic.RCS1058.severity = warning +dotnet_diagnostic.RCS1068.severity = warning +dotnet_diagnostic.RCS1073.severity = warning +dotnet_diagnostic.RCS1077.severity = warning +dotnet_diagnostic.RCS1084.severity = warning +dotnet_diagnostic.RCS1085.severity = warning +dotnet_diagnostic.RCS1089.severity = warning +dotnet_diagnostic.RCS1093.severity = warning +dotnet_diagnostic.RCS1097.severity = warning +dotnet_diagnostic.RCS1098.severity = warning +dotnet_diagnostic.RCS1099.severity = warning +dotnet_diagnostic.RCS1103.severity = warning +dotnet_diagnostic.RCS1104.severity = warning +dotnet_diagnostic.RCS1105.severity = warning +dotnet_diagnostic.RCS1107.severity = warning +dotnet_diagnostic.RCS1108.severity = warning +dotnet_diagnostic.RCS1110.severity = warning +dotnet_diagnostic.RCS1112.severity = warning +dotnet_diagnostic.RCS1113.severity = warning +dotnet_diagnostic.RCS1114.severity = warning +dotnet_diagnostic.RCS1118.severity = warning +dotnet_diagnostic.RCS1123.severity = warning +dotnet_diagnostic.RCS1128.severity = warning +dotnet_diagnostic.RCS1130.severity = warning +dotnet_diagnostic.RCS1132.severity = warning +dotnet_diagnostic.RCS1135.severity = warning +dotnet_diagnostic.RCS1146.severity = warning +dotnet_diagnostic.RCS1154.severity = warning +dotnet_diagnostic.RCS1156.severity = warning +dotnet_diagnostic.RCS1157.severity = warning +dotnet_diagnostic.RCS1158.severity = warning +dotnet_diagnostic.RCS1159.severity = warning +dotnet_diagnostic.RCS1160.severity = warning +dotnet_diagnostic.RCS1163.severity = suggestion +dotnet_diagnostic.RCS1164.severity = warning +dotnet_diagnostic.RCS1166.severity = warning +dotnet_diagnostic.RCS1169.severity = warning +dotnet_diagnostic.RCS1170.severity = warning +dotnet_diagnostic.RCS1171.severity = warning +dotnet_diagnostic.RCS1173.severity = warning +dotnet_diagnostic.RCS1175.severity = warning +dotnet_diagnostic.RCS1179.severity = warning +dotnet_diagnostic.RCS1180.severity = warning +dotnet_diagnostic.RCS1187.severity = warning +dotnet_diagnostic.RCS1190.severity = warning +dotnet_diagnostic.RCS1191.severity = warning +dotnet_diagnostic.RCS1192.severity = warning +dotnet_diagnostic.RCS1195.severity = warning +dotnet_diagnostic.RCS1196.severity = warning +dotnet_diagnostic.RCS1197.severity = warning +dotnet_diagnostic.RCS1199.severity = warning +dotnet_diagnostic.RCS1200.severity = warning +dotnet_diagnostic.RCS1202.severity = warning +dotnet_diagnostic.RCS1204.severity = warning +dotnet_diagnostic.RCS1205.severity = warning +dotnet_diagnostic.RCS1206.severity = warning +dotnet_diagnostic.RCS1209.severity = warning +dotnet_diagnostic.RCS1212.severity = warning +dotnet_diagnostic.RCS1213.severity = suggestion +dotnet_diagnostic.RCS1214.severity = warning +dotnet_diagnostic.RCS1216.severity = warning +dotnet_diagnostic.RCS1218.severity = warning +dotnet_diagnostic.RCS1220.severity = warning +dotnet_diagnostic.RCS1221.severity = warning +dotnet_diagnostic.RCS1222.severity = warning +dotnet_diagnostic.RCS1224.severity = warning +dotnet_diagnostic.RCS1225.severity = warning +dotnet_diagnostic.RCS1226.severity = warning +dotnet_diagnostic.RCS1227.severity = warning +dotnet_diagnostic.RCS1229.severity = warning +dotnet_diagnostic.RCS1230.severity = warning +dotnet_diagnostic.RCS1232.severity = warning +dotnet_diagnostic.RCS1233.severity = warning +dotnet_diagnostic.RCS1234.severity = warning +dotnet_diagnostic.RCS1235.severity = warning +dotnet_diagnostic.RCS1236.severity = warning +dotnet_diagnostic.RCS1239.severity = warning +dotnet_diagnostic.RCS1240.severity = warning +dotnet_diagnostic.RCS1243.severity = warning +dotnet_diagnostic.RCS1246.severity = warning +dotnet_diagnostic.RCS1247.severity = warning +dotnet_diagnostic.RCS1249.severity = warning +dotnet_diagnostic.RCS1251.severity = warning +dotnet_diagnostic.RCS1256.severity = warning +dotnet_diagnostic.RCS1257.severity = warning +dotnet_diagnostic.RCS1258.severity = warning +dotnet_diagnostic.RCS1259.severity = warning +dotnet_diagnostic.RCS1261.severity = warning +dotnet_diagnostic.RCS1262.severity = warning +dotnet_diagnostic.RCS1265.severity = warning +dotnet_diagnostic.RCS1266.severity = warning +dotnet_diagnostic.RCS1267.severity = warning +dotnet_diagnostic.RCS1268.severity = warning +dotnet_diagnostic.RCS9002.severity = warning +dotnet_diagnostic.RCS9003.severity = warning +dotnet_diagnostic.RCS9004.severity = warning +dotnet_diagnostic.RCS9005.severity = warning +dotnet_diagnostic.RCS9006.severity = warning +dotnet_diagnostic.RCS9008.severity = warning dotnet_diagnostic.IDE0007.severity = none dotnet_diagnostic.IDE0007WithoutSuggestion.severity = none dotnet_diagnostic.IDE0008.severity = none