Skip to content

Commit b48f49e

Browse files
author
Per Kops
committed
feat: update coding-rules and projects to dotnet 8
1 parent 7ed8b01 commit b48f49e

File tree

12 files changed

+43
-22
lines changed

12 files changed

+43
-22
lines changed

.editorconfig

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# ATC coding rules - https://github.com/atc-net/atc-coding-rules
2-
# Version: 1.0.9
3-
# Updated: 24-11-2022
2+
# Version: 1.0.0
3+
# Updated: 25-09-2023
44
# Location: Root
5-
# Distribution: DotNet7
5+
# Distribution: DotNet8
66
# Inspired by: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options
77

88
##########################################
@@ -87,6 +87,7 @@ dotnet_separate_import_directive_groups = false
8787
# .NET Code Style Settings
8888
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#net-code-style-settings
8989
[*.{cs,csx,cake}]
90+
9091
# "this." and "Me." qualifiers
9192
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#this-and-me
9293
dotnet_style_qualification_for_field = false
@@ -146,6 +147,7 @@ dotnet_style_operator_placement_when_wrapping = end_of_line
146147
# C# Code Style Settings
147148
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#c-code-style-settings
148149
[*.{cs,csx,cake}]
150+
149151
# Implicit and explicit types
150152
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#implicit-and-explicit-types
151153
csharp_style_var_for_built_in_types = true # IDE0007 and IDE0008
@@ -199,8 +201,8 @@ csharp_style_unused_value_assignment_preference = discard_variable
199201

200202
# Index and range preferences
201203
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#index-and-range-preferences
202-
csharp_style_prefer_index_operator = true # IDE0056
203-
csharp_style_prefer_range_operator = true # IDE0057
204+
csharp_style_prefer_index_operator = true:suggestion # IDE0056
205+
csharp_style_prefer_range_operator = true:suggestion # IDE0057
204206

205207
# Miscellaneous preferences
206208
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#miscellaneous-preferences
@@ -448,19 +450,25 @@ dotnet_naming_rule.parameters_rule.severity = warning
448450
dotnet_diagnostic.MA0003.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0003.md
449451
dotnet_diagnostic.MA0004.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0004.md
450452
dotnet_diagnostic.MA0006.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0006.md
453+
dotnet_diagnostic.MA0011.severity = none # Duplicate of CA1305
451454
dotnet_diagnostic.MA0016.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0016.md
452455
dotnet_diagnostic.MA0025.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0025.md
453456
dotnet_diagnostic.MA0026.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0026.md
454457
dotnet_diagnostic.MA0028.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0028.md
458+
dotnet_diagnostic.MA0038.severity = none # Duplicate of CA1822
455459
dotnet_diagnostic.MA0048.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0048.md
456460

457461

458462
# Microsoft - Code Analysis
459463
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/
460464
dotnet_diagnostic.CA1014.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1014.md
461465
dotnet_diagnostic.CA1068.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1068.md
466+
dotnet_diagnostic.CA1305.severity = error
462467
dotnet_diagnostic.CA1707.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1707.md
468+
dotnet_diagnostic.CA1812.severity = none
469+
dotnet_diagnostic.CA1822.severity = suggestion
463470
dotnet_diagnostic.CA2007.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA2007.md
471+
dotnet_diagnostic.IDE0005.severity = warning # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/IDE0005.md
464472
dotnet_diagnostic.IDE0058.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/IDE0058.md
465473

466474

@@ -485,6 +493,7 @@ dotnet_diagnostic.SA1202.severity = none # https://github.com/atc-net
485493
dotnet_diagnostic.SA1204.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1204.md
486494
dotnet_diagnostic.SA1413.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1413.md
487495
dotnet_diagnostic.SA1600.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1600.md
496+
dotnet_diagnostic.SA1601.severity = none
488497
dotnet_diagnostic.SA1602.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1602.md
489498
dotnet_diagnostic.SA1604.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1604.md
490499
dotnet_diagnostic.SA1623.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1623.md
@@ -511,6 +520,8 @@ dotnet_diagnostic.IDE0057.severity = none # Substring can be simplifie
511520

512521
dotnet_diagnostic.CA1054.severity = none # URI parameters should not be strings
513522
dotnet_diagnostic.CA1848.severity = none # For improved performance, use the LoggerMessage delegates instead of calling 'LoggerExtensions.LogTrace(ILogger, string, params object[])'
523+
dotnet_diagnostic.CA1859.severity = none #
524+
dotnet_diagnostic.CA1860.severity = none #
514525
dotnet_diagnostic.CA2007.severity = none # Consider calling ConfigureAwait on the awaited task
515526
dotnet_diagnostic.CA2254.severity = none # For improved performance, use the LoggerMessage delegates instead of calling 'LoggerExtensions.LogTrace(ILogger, string, params object[])'
516527

@@ -520,4 +531,13 @@ dotnet_diagnostic.MA0075.severity = none # Do not use implicit cultur
520531
dotnet_diagnostic.MA0076.severity = none # Do not use implicit culture-sensitive ToString in interpolated strings
521532

522533
dotnet_diagnostic.S1172.severity = none # False positive
523-
dotnet_diagnostic.S4457.severity = none # Split this method into two, one handling parameters check and the other handling the asynchronous code
534+
dotnet_diagnostic.S2589.severity = none #
535+
dotnet_diagnostic.S2629.severity = none #
536+
dotnet_diagnostic.S3267.severity = none #
537+
dotnet_diagnostic.S3878.severity = none #
538+
dotnet_diagnostic.S4457.severity = none # Split this method into two, one handling parameters check and the other handling the asynchronous code
539+
dotnet_diagnostic.S6602.severity = none #
540+
dotnet_diagnostic.S6605.severity = none #
541+
dotnet_diagnostic.S6618.severity = none #
542+
dotnet_diagnostic.S6667.severity = none #
543+
dotnet_diagnostic.S6608.severity = none #

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
<PropertyGroup Label="Compile settings">
1818
<Nullable>enable</Nullable>
19-
<LangVersion>10.0</LangVersion>
19+
<LangVersion>12.0</LangVersion>
2020
<ImplicitUsings>enable</ImplicitUsings>
21-
<TargetFramework>net6.0</TargetFramework>
21+
<TargetFramework>net8.0</TargetFramework>
2222
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2323
<NoWarn>1573,1591,1712,CA1014</NoWarn>
2424

atc-coding-rules-updater.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"projectTarget": "DotNet6",
2+
"projectTarget": "DotNet8",
33
"mappings": {
44
"src": { "paths": [ "src" ] },
55
"test": { "paths": [ "test" ] }

sample/atc-coding-rules-updater.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"projectTarget": "DotNet6",
2+
"projectTarget": "DotNet8",
33
"useLatestMinorNugetVersion": true,
44
"useTemporarySuppressions": false,
55
"temporarySuppressionAsExcel": false,

src/.editorconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# ATC coding rules - https://github.com/atc-net/atc-coding-rules
2-
# Version: 1.0.9
3-
# Updated: 24-11-2022
2+
# Version: 1.0.0
3+
# Updated: 25-09-2023
44
# Location: src
5-
# Distribution: DotNet7
5+
# Distribution: DotNet8
66
# Inspired by: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options
77

88
##########################################

src/Atc.CodingRules.AnalyzerProviders/Atc.CodingRules.AnalyzerProviders.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

src/Atc.CodingRules.Updater.CLI/Atc.CodingRules.Updater.CLI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<PackageId>atc-coding-rules-updater</PackageId>
66
<PackageTags>coding-rules;rules</PackageTags>
77
<Description>A .NET Tool that can update a project with the latest atc-coding-rules.</Description>

src/Atc.CodingRules.Updater/Atc.CodingRules.Updater.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>

src/Atc.CodingRules/Atc.CodingRules.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>

test/.editorconfig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# ATC coding rules - https://github.com/atc-net/atc-coding-rules
2-
# Version: 1.0.9
3-
# Updated: 24-11-2022
2+
# Version: 1.0.0
3+
# Updated: 25-09-2023
44
# Location: test
5-
# Distribution: DotNet7
5+
# Distribution: DotNet8
66
# Inspired by: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options
77

88
##########################################
@@ -27,6 +27,7 @@ dotnet_diagnostic.MA0016.severity = none # https://github.com/atc-net
2727
# Microsoft - Code Analysis
2828
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/
2929
dotnet_diagnostic.CA1068.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1068.md
30+
dotnet_diagnostic.CA1602.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1602.md
3031
dotnet_diagnostic.CA1707.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1707.md
3132
dotnet_diagnostic.CA2007.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA2007.md
3233

0 commit comments

Comments
 (0)