Skip to content

Commit a698012

Browse files
author
Per Kops
committed
fix: move coding-rules to proper sections for some project-frameworks
1 parent 2f93c17 commit a698012

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

distribution/project-frameworks/blazor/.editorconfig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
##########################################
1010
[*.{cs}]
1111

12-
dotnet_diagnostic.MA0048.severity = none # To support code-behind [component].razor.cs files / Inherit from ComponentBase - File will not match type name.
13-
14-
##########################################
15-
# Custom - Code Analyzers Rules
16-
##########################################
12+
dotnet_diagnostic.ASP0006.severity = suggestion # Do not use non-literal sequence numbers - https://learn.microsoft.com/en-us/aspnet/core/diagnostics/asp0006?view=aspnetcore-8.0
1713

1814
dotnet_diagnostic.BL0001.severity = error # Component parameter should have public setters - https://learn.microsoft.com/en-us/aspnet/core/diagnostics/bl0001?view=aspnetcore-8.0
1915
dotnet_diagnostic.BL0002.severity = error # Component has multiple CaptureUnmatchedValues parameters - https://learn.microsoft.com/en-us/aspnet/core/diagnostics/bl0002?view=aspnetcore-8.0
@@ -22,4 +18,8 @@ dotnet_diagnostic.BL0004.severity = error # Component parameter should
2218
dotnet_diagnostic.BL0005.severity = error # Component parameter should not be set outside of its component - https://learn.microsoft.com/en-us/aspnet/core/diagnostics/bl0005?view=aspnetcore-8.0
2319
dotnet_diagnostic.BL0006.severity = warning # Do not use RenderTree types - https://learn.microsoft.com/en-us/aspnet/core/diagnostics/bl0006?view=aspnetcore-8.0
2420

25-
dotnet_diagnostic.ASP0006.severity = suggestion # Do not use non-literal sequence numbers - https://learn.microsoft.com/en-us/aspnet/core/diagnostics/asp0006?view=aspnetcore-8.0
21+
dotnet_diagnostic.MA0048.severity = none # To support code-behind [component].razor.cs files / Inherit from ComponentBase - File will not match type name.
22+
23+
##########################################
24+
# Custom - Code Analyzers Rules
25+
##########################################

distribution/project-frameworks/webapi/.editorconfig

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@
99
##########################################
1010
[*.{cs}]
1111

12-
dotnet_diagnostic.CA1062.severity = none # No need for null-checking in public method.
13-
14-
dotnet_diagnostic.MA0004.severity = none # Use Task.ConfigureAwait(false) https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0004.md
15-
16-
##########################################
17-
# Custom - Code Analyzers Rules
18-
##########################################
19-
2012
dotnet_diagnostic.ASP0000.severity = error # Do not call 'IServiceCollection.BuildServiceProvider' in 'ConfigureServices' - https://learn.microsoft.com/en-us/aspnet/core/diagnostics/asp0000?view=aspnetcore-8.0
2113
dotnet_diagnostic.ASP0001.severity = error # Authorization middleware is incorrectly configured - https://learn.microsoft.com/en-us/aspnet/core/diagnostics/ASP0001?view=aspnetcore-8.0
2214
dotnet_diagnostic.ASP0003.severity = error # Do not use model binding attributes with route handlers - https://learn.microsoft.com/en-us/aspnet/core/diagnostics/asp0003?view=aspnetcore-8.0
@@ -40,4 +32,12 @@ dotnet_diagnostic.ASP0021.severity = none # The return type of the Bin
4032
dotnet_diagnostic.ASP0022.severity = error # Route conflict detected between route handlers (Minimal API) - https://learn.microsoft.com/en-us/aspnet/core/diagnostics/asp0022?view=aspnetcore-8.0
4133
dotnet_diagnostic.ASP0023.severity = error # Route conflict detected between route handlers (MVC) - https://learn.microsoft.com/en-us/aspnet/core/diagnostics/asp0023?view=aspnetcore-8.0
4234
dotnet_diagnostic.ASP0024.severity = error # Route handler has multiple parameters with the [FromBody] attribute - https://learn.microsoft.com/en-us/aspnet/core/diagnostics/asp0024?view=aspnetcore-8.0
43-
dotnet_diagnostic.ASP0025.severity = suggestion # Use AddAuthorizationBuilder to register authorization services and construct policies - https://learn.microsoft.com/en-us/aspnet/core/diagnostics/asp0025?view=aspnetcore-8.0
35+
dotnet_diagnostic.ASP0025.severity = suggestion # Use AddAuthorizationBuilder to register authorization services and construct policies - https://learn.microsoft.com/en-us/aspnet/core/diagnostics/asp0025?view=aspnetcore-8.0
36+
37+
dotnet_diagnostic.CA1062.severity = none # No need for null-checking in public method.
38+
39+
dotnet_diagnostic.MA0004.severity = none # Use Task.ConfigureAwait(false) https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0004.md
40+
41+
##########################################
42+
# Custom - Code Analyzers Rules
43+
##########################################

distribution/project-frameworks/wpf/.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
##########################################
1010
[*.{cs}]
1111

12+
dotnet_diagnostic.CA2227.severity = none # Change property to be read-only by removing the property setter - https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2227
13+
1214
dotnet_diagnostic.MA0004.severity = error # Use Task.ConfigureAwait(false) https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0004.md
1315
dotnet_diagnostic.MA0048.severity = none # To support partial classes - File will not match type name.
1416

15-
dotnet_diagnostic.CA2227.severity = none # Change property to be read-only by removing the property setter - https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2227
16-
1717
##########################################
1818
# Custom - Code Analyzers Rules
1919
##########################################

0 commit comments

Comments
 (0)