From 8d2b15de078225c9d19b3776e52081fdb1f38308 Mon Sep 17 00:00:00 2001 From: davidkallesen Date: Wed, 14 Jan 2026 11:32:57 +0100 Subject: [PATCH 1/2] feat(style): change ATC203 severity from Warning to Suggestion --- .gitignore | 1 + README.md | 2 +- docs/rules/ATC203.md | 2 +- .../AnalyzerReleases.Unshipped.md | 6 ++++ .../Style/MethodChainSeparationAnalyzer.cs | 2 +- ...thodChainSeparationCodeFixProviderTests.cs | 28 +++++++++---------- 6 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index ce89292..adbb137 100644 --- a/.gitignore +++ b/.gitignore @@ -416,3 +416,4 @@ FodyWeavers.xsd *.msix *.msm *.msp +.claude/settings.local.json diff --git a/README.md b/README.md index bba1c2b..6975632 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Once installed, the analyzer will automatically run during compilation and highl | --- | --- | --- | --- | --- | --- | | [ATC201](docs/rules/ATC201.md) | Style | Single parameter should be kept inline when declaration is short | ⚠️ Warning | ✔️ Yes | ✅ Yes | | [ATC202](docs/rules/ATC202.md) | Style | Multi parameters should be separated on individual lines | ⚠️ Warning | ✔️ Yes | ✅ Yes | -| [ATC203](docs/rules/ATC203.md) | Style | Method chains with 2 or more calls should be placed on separate lines | ⚠️ Warning | ✔️ Yes | ✅ Yes | +| [ATC203](docs/rules/ATC203.md) | Style | Method chains with 2 or more calls should be placed on separate lines | ℹ️ Suggestion | ✔️ Yes | ✅ Yes | | [ATC210](docs/rules/ATC210.md) | Style | Use expression body syntax when appropriate | ⚠️ Warning | ✔️ Yes | ✅ Yes | | [ATC220](docs/rules/ATC220.md) | Style | Use global usings for all namespaces (strict policy) | ⚠️ Warning | ✔️ Yes | ✅ Yes | | [ATC221](docs/rules/ATC221.md) | Style | Use global usings for common namespaces (lenient policy) | ⚠️ Warning | ✔️ Yes | ✅ Yes | diff --git a/docs/rules/ATC203.md b/docs/rules/ATC203.md index a9713a9..ffc97c7 100644 --- a/docs/rules/ATC203.md +++ b/docs/rules/ATC203.md @@ -6,7 +6,7 @@ Style ## ⚠️ Severity -Warning +Suggestion (Info) ## 📖 Description diff --git a/src/Atc.Analyzer/AnalyzerReleases.Unshipped.md b/src/Atc.Analyzer/AnalyzerReleases.Unshipped.md index 7b845f4..2589023 100644 --- a/src/Atc.Analyzer/AnalyzerReleases.Unshipped.md +++ b/src/Atc.Analyzer/AnalyzerReleases.Unshipped.md @@ -5,3 +5,9 @@ Rule ID | Category | Severity | Notes --------|----------|----------|------- + +### Changed Rules + +Rule ID | New Category | New Severity | Old Category | Old Severity | Notes +--------|--------------|--------------|--------------|--------------|------- +ATC203 | Style | Info | Style | Warning | Changed severity from Warning to Info (Suggestion) diff --git a/src/Atc.Analyzer/Rules/Style/MethodChainSeparationAnalyzer.cs b/src/Atc.Analyzer/Rules/Style/MethodChainSeparationAnalyzer.cs index 914c0c5..00fef3d 100644 --- a/src/Atc.Analyzer/Rules/Style/MethodChainSeparationAnalyzer.cs +++ b/src/Atc.Analyzer/Rules/Style/MethodChainSeparationAnalyzer.cs @@ -10,7 +10,7 @@ public sealed class MethodChainSeparationAnalyzer : DiagnosticAnalyzer title: "Method chains with 2 or more calls should be placed on separate lines", messageFormat: "Method chains with 2 or more calls should be broken down to separate lines", RuleCategoryConstants.Style, - DiagnosticSeverity.Warning, + DiagnosticSeverity.Info, isEnabledByDefault: true, description: "Ensures consistent method chain formatting. When chaining 2 or more method calls, each method should be on a separate line for better readability.", helpLinkUri: RuleIdentifierHelper.GetHelpUri(RuleIdentifierConstants.Style.MethodChainSeparation)); diff --git a/test/Atc.Analyzer.Tests/Rules/Style/MethodChainSeparationCodeFixProviderTests.cs b/test/Atc.Analyzer.Tests/Rules/Style/MethodChainSeparationCodeFixProviderTests.cs index 71bf41a..4c785a1 100644 --- a/test/Atc.Analyzer.Tests/Rules/Style/MethodChainSeparationCodeFixProviderTests.cs +++ b/test/Atc.Analyzer.Tests/Rules/Style/MethodChainSeparationCodeFixProviderTests.cs @@ -36,7 +36,7 @@ public void TestMethod(string str) { new DiagnosticResult( "ATC203", - DiagnosticSeverity.Warning) + DiagnosticSeverity.Info) .WithSpan(5, 22, 5, 42), }; @@ -73,7 +73,7 @@ public void TestMethod(string str) { new DiagnosticResult( "ATC203", - DiagnosticSeverity.Warning) + DiagnosticSeverity.Info) .WithSpan(5, 22, 5, 62), }; @@ -116,7 +116,7 @@ public void TestMethod(List numbers) { new DiagnosticResult( "ATC203", - DiagnosticSeverity.Warning) + DiagnosticSeverity.Info) .WithSpan(8, 22, 8, 75), }; @@ -157,7 +157,7 @@ public void TestMethod() { new DiagnosticResult( "ATC203", - DiagnosticSeverity.Warning) + DiagnosticSeverity.Info) .WithSpan(7, 22, 7, 85), }; @@ -193,7 +193,7 @@ public string TestMethod(string str) { new DiagnosticResult( "ATC203", - DiagnosticSeverity.Warning) + DiagnosticSeverity.Info) .WithSpan(5, 16, 5, 36), }; @@ -237,7 +237,7 @@ public async Task TestMethod() { new DiagnosticResult( "ATC203", - DiagnosticSeverity.Warning) + DiagnosticSeverity.Info) .WithSpan(9, 22, 9, 86), }; @@ -274,7 +274,7 @@ public void TestMethod(string str) { new DiagnosticResult( "ATC203", - DiagnosticSeverity.Warning) + DiagnosticSeverity.Info) .WithSpan(5, 22, 5, 72), }; @@ -314,7 +314,7 @@ public void TestMethod() { new DiagnosticResult( "ATC203", - DiagnosticSeverity.Warning) + DiagnosticSeverity.Info) .WithSpan(7, 22, 7, 72), }; @@ -352,7 +352,7 @@ public void TestMethod(string str) { new DiagnosticResult( "ATC203", - DiagnosticSeverity.Warning) + DiagnosticSeverity.Info) .WithSpan(6, 18, 6, 38), }; @@ -392,7 +392,7 @@ public void TestMethod(string str) { new DiagnosticResult( "ATC203", - DiagnosticSeverity.Warning) + DiagnosticSeverity.Info) .WithSpan(7, 27, 7, 47), }; @@ -440,7 +440,7 @@ public void TestMethod() { new DiagnosticResult( "ATC203", - DiagnosticSeverity.Warning) + DiagnosticSeverity.Info) .WithSpan(9, 30, 9, 53), }; @@ -482,7 +482,7 @@ public void TestMethod() { new DiagnosticResult( "ATC203", - DiagnosticSeverity.Warning) + DiagnosticSeverity.Info) .WithSpan(7, 18, 7, 92), }; @@ -522,7 +522,7 @@ public void TestMethod() { new DiagnosticResult( "ATC203", - DiagnosticSeverity.Warning) + DiagnosticSeverity.Info) .WithSpan(7, 22, 7, 67), }; @@ -566,7 +566,7 @@ public void TestMethod() { new DiagnosticResult( "ATC203", - DiagnosticSeverity.Warning) + DiagnosticSeverity.Info) .WithSpan(7, 18, 9, 24), }; From 16215375c0245a768e842a6f7478b36ab0fcc097 Mon Sep 17 00:00:00 2001 From: davidkallesen Date: Wed, 14 Jan 2026 11:44:16 +0100 Subject: [PATCH 2/2] chore: downgrade Roslyn to 4.14.0 for broader SDK compatibility --- README.md | 10 ++++++++++ src/Atc.Analyzer/Atc.Analyzer.csproj | 4 ++-- test/Atc.Analyzer.Tests/Atc.Analyzer.Tests.csproj | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6975632..1600e4b 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,16 @@ A Roslyn analyzer to enforce some good practices in C# in terms of design, usage dotnet add package Atc.Analyzer ``` +## Compatibility + +| Requirement | Minimum Version | +| --- | --- | +| .NET SDK | 6.0+ | +| Visual Studio | 2022 (17.0+) | +| Roslyn | 4.14.0+ | + +The analyzer is built against Roslyn 4.14.0 for broad compatibility with .NET 6, 7, 8, 9, and 10 projects. + ## Usage Once installed, the analyzer will automatically run during compilation and highlight code issues in your IDE. Code fixes are available for many rules and can be applied directly from your IDE. diff --git a/src/Atc.Analyzer/Atc.Analyzer.csproj b/src/Atc.Analyzer/Atc.Analyzer.csproj index 058bb2c..edc03c8 100644 --- a/src/Atc.Analyzer/Atc.Analyzer.csproj +++ b/src/Atc.Analyzer/Atc.Analyzer.csproj @@ -32,8 +32,8 @@ - - + + diff --git a/test/Atc.Analyzer.Tests/Atc.Analyzer.Tests.csproj b/test/Atc.Analyzer.Tests/Atc.Analyzer.Tests.csproj index 4133725..6f07521 100644 --- a/test/Atc.Analyzer.Tests/Atc.Analyzer.Tests.csproj +++ b/test/Atc.Analyzer.Tests/Atc.Analyzer.Tests.csproj @@ -18,7 +18,7 @@ - +