diff --git a/.editorconfig b/.editorconfig
index fb73b7d..79752d5 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -201,8 +201,8 @@ csharp_style_unused_value_assignment_preference = discard_variable
# Index and range preferences
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#index-and-range-preferences
-csharp_style_prefer_index_operator = true # IDE0056
-csharp_style_prefer_range_operator = true # IDE0057
+csharp_style_prefer_index_operator = true:suggestion # IDE0056
+csharp_style_prefer_range_operator = true:suggestion # IDE0057
# Miscellaneous preferences
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#miscellaneous-preferences
@@ -450,10 +450,12 @@ dotnet_naming_rule.parameters_rule.severity = warning
dotnet_diagnostic.MA0003.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0003.md
dotnet_diagnostic.MA0004.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0004.md
dotnet_diagnostic.MA0006.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0006.md
+dotnet_diagnostic.MA0011.severity = none # Duplicate of CA1305
dotnet_diagnostic.MA0016.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0016.md
dotnet_diagnostic.MA0025.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0025.md
dotnet_diagnostic.MA0026.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0026.md
dotnet_diagnostic.MA0028.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0028.md
+dotnet_diagnostic.MA0038.severity = none # Duplicate of CA1822
dotnet_diagnostic.MA0048.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0048.md
@@ -461,7 +463,10 @@ dotnet_diagnostic.MA0048.severity = error # https://github.com/atc-net
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/
dotnet_diagnostic.CA1014.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1014.md
dotnet_diagnostic.CA1068.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1068.md
+dotnet_diagnostic.CA1305.severity = error
dotnet_diagnostic.CA1707.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1707.md
+dotnet_diagnostic.CA1812.severity = none
+dotnet_diagnostic.CA1822.severity = suggestion
dotnet_diagnostic.CA2007.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA2007.md
dotnet_diagnostic.IDE0005.severity = warning # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/IDE0005.md
dotnet_diagnostic.IDE0058.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/IDE0058.md
@@ -488,6 +493,7 @@ dotnet_diagnostic.SA1202.severity = none # https://github.com/atc-net
dotnet_diagnostic.SA1204.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1204.md
dotnet_diagnostic.SA1413.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1413.md
dotnet_diagnostic.SA1600.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1600.md
+dotnet_diagnostic.SA1601.severity = none
dotnet_diagnostic.SA1602.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1602.md
dotnet_diagnostic.SA1604.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1604.md
dotnet_diagnostic.SA1623.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1623.md
@@ -499,6 +505,10 @@ dotnet_diagnostic.SA1649.severity = error # https://github.com/atc-net
# SonarAnalyzer.CSharp
# https://rules.sonarsource.com/csharp
dotnet_diagnostic.S1135.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/SonarAnalyzerCSharp/S1135.md
+dotnet_diagnostic.S2629.severity = none # Don't use string interpolation in logging message templates.
+dotnet_diagnostic.S6602.severity = none # "Find" method should be used instead of the "FirstOrDefault"
+dotnet_diagnostic.S6603.severity = none # The collection-specific "TrueForAll" method should be used instead of the "All"
+dotnet_diagnostic.S6605.severity = none # Collection-specific "Exists" method should be used instead of the "Any"
##########################################
diff --git a/.github/workflows/post-integration.yml b/.github/workflows/post-integration.yml
index a15da48..5dcc114 100644
--- a/.github/workflows/post-integration.yml
+++ b/.github/workflows/post-integration.yml
@@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🛒 Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PAT_WORKFLOWS }}
@@ -31,7 +31,7 @@ jobs:
setAllVars: true
- name: ⚙️ Setup dotnet 8.0.x
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
diff --git a/.github/workflows/pre-integration.yml b/.github/workflows/pre-integration.yml
index ec7d3c2..332585f 100644
--- a/.github/workflows/pre-integration.yml
+++ b/.github/workflows/pre-integration.yml
@@ -15,12 +15,12 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: 🛒 Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ⚙️ Setup dotnet 8.0.x
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index c826c5c..1caaa60 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🛒 Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PAT_WORKFLOWS }}
@@ -28,7 +28,7 @@ jobs:
setAllVars: true
- name: ⚙️ Setup dotnet 8.0.x
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
diff --git a/Directory.Build.props b/Directory.Build.props
index 3468960..007704e 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -50,7 +50,7 @@
-
+
\ No newline at end of file
diff --git a/atc-coding-rules-updater.json b/atc-coding-rules-updater.json
index 7316da7..65e3cb3 100644
--- a/atc-coding-rules-updater.json
+++ b/atc-coding-rules-updater.json
@@ -1,5 +1,9 @@
{
"projectTarget": "DotNet8",
+ "useLatestMinorNugetVersion": true,
+ "useTemporarySuppressions": false,
+ "temporarySuppressionAsExcel": false,
+ "analyzerProviderCollectingMode": "LocalCache",
"mappings": {
"src": {
"paths": [
diff --git a/atc-coding-rules-updater.ps1 b/atc-coding-rules-updater.ps1
index df1a648..3d555a8 100644
--- a/atc-coding-rules-updater.ps1
+++ b/atc-coding-rules-updater.ps1
@@ -9,4 +9,4 @@ atc-coding-rules-updater `
run `
-p $currentPath `
--optionsPath $currentPath'\atc-coding-rules-updater.json' `
- -v
\ No newline at end of file
+ --verbose
\ No newline at end of file
diff --git a/sample/Directory.Build.props b/sample/Directory.Build.props
index dbe670b..a96f0a3 100644
--- a/sample/Directory.Build.props
+++ b/sample/Directory.Build.props
@@ -16,9 +16,9 @@
enable
- 11.0
+ 12.0
enable
- net7.0
+ net8.0
true
1573,1591,1712,CA1014
@@ -47,10 +47,10 @@
-
+
-
+
\ No newline at end of file
diff --git a/sample/src/Demo.Api.Contracts/Demo.Api.Contracts.csproj b/sample/src/Demo.Api.Contracts/Demo.Api.Contracts.csproj
index 6c6af3f..16097fb 100644
--- a/sample/src/Demo.Api.Contracts/Demo.Api.Contracts.csproj
+++ b/sample/src/Demo.Api.Contracts/Demo.Api.Contracts.csproj
@@ -11,9 +11,9 @@
-
-
-
+
+
+
diff --git a/sample/src/Demo.Api/.editorconfig b/sample/src/Demo.Api/.editorconfig
index 440b836..f9b574c 100644
--- a/sample/src/Demo.Api/.editorconfig
+++ b/sample/src/Demo.Api/.editorconfig
@@ -1,45 +1,17 @@
# ATC coding rules - https://github.com/atc-net/atc-coding-rules
-# Version: 1.0.9
-# Updated: 01-02-2022
-# Location: Demo.Api
-# Distribution: DotNet7
-# Inspired by: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options
+# Version: 1.0.1
+# Updated: 08-04-2024
+# Location: webapi
+# Distribution: Frameworks
##########################################
# Code Analyzers Rules
##########################################
-[*.{cs,csx,cake}]
+[*.{cs}]
-# AsyncFixer
-# http://www.asyncfixer.com
+dotnet_diagnostic.CA1062.severity = none # No need for null-checking in public method.
-
-# Asyncify
-# https://github.com/hvanbakel/Asyncify-CSharp
-
-
-# Meziantou
-# https://www.meziantou.net/enforcing-asynchronous-code-good-practices-using-a-roslyn-analyzer.htm
-
-
-# Microsoft - Code Analysis
-# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/
-
-
-# Microsoft - Compiler Errors
-# https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/
-
-
-# SecurityCodeScan
-# https://security-code-scan.github.io/
-
-
-# StyleCop
-# https://github.com/DotNetAnalyzers/StyleCopAnalyzers
-
-
-# SonarAnalyzer.CSharp
-# https://rules.sonarsource.com/csharp
+dotnet_diagnostic.MA0004.severity = none # Use Task.ConfigureAwait(false) https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0004.md
##########################################
diff --git a/sample/src/Demo.Api/Demo.Api.csproj b/sample/src/Demo.Api/Demo.Api.csproj
index 9a9babc..e71dd71 100644
--- a/sample/src/Demo.Api/Demo.Api.csproj
+++ b/sample/src/Demo.Api/Demo.Api.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/sample/src/Demo.Domain/Demo.Domain.csproj b/sample/src/Demo.Domain/Demo.Domain.csproj
index ec842fc..a1b0d9d 100644
--- a/sample/src/Demo.Domain/Demo.Domain.csproj
+++ b/sample/src/Demo.Domain/Demo.Domain.csproj
@@ -5,19 +5,19 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
diff --git a/sample/test/Demo.Api.Contracts.Tests/Demo.Api.Contracts.Tests.csproj b/sample/test/Demo.Api.Contracts.Tests/Demo.Api.Contracts.Tests.csproj
index 66962d3..8cb13e0 100644
--- a/sample/test/Demo.Api.Contracts.Tests/Demo.Api.Contracts.Tests.csproj
+++ b/sample/test/Demo.Api.Contracts.Tests/Demo.Api.Contracts.Tests.csproj
@@ -7,13 +7,13 @@
-
-
-
+
+
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/sample/test/Demo.Api.IntegrationTests/Demo.Api.IntegrationTests.csproj b/sample/test/Demo.Api.IntegrationTests/Demo.Api.IntegrationTests.csproj
index 3094f18..98f500e 100644
--- a/sample/test/Demo.Api.IntegrationTests/Demo.Api.IntegrationTests.csproj
+++ b/sample/test/Demo.Api.IntegrationTests/Demo.Api.IntegrationTests.csproj
@@ -7,14 +7,14 @@
-
-
-
-
+
+
+
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/sample/test/Demo.Domain.Tests/Demo.Domain.Tests.csproj b/sample/test/Demo.Domain.Tests/Demo.Domain.Tests.csproj
index 8aa123a..b639427 100644
--- a/sample/test/Demo.Domain.Tests/Demo.Domain.Tests.csproj
+++ b/sample/test/Demo.Domain.Tests/Demo.Domain.Tests.csproj
@@ -7,13 +7,13 @@
-
-
-
+
+
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/sample/test/Directory.Build.props b/sample/test/Directory.Build.props
index b8ec10d..586e8e3 100644
--- a/sample/test/Directory.Build.props
+++ b/sample/test/Directory.Build.props
@@ -11,8 +11,8 @@
-
-
+
+
diff --git a/src/Atc.Rest.MinimalApi/Atc.Rest.MinimalApi.csproj b/src/Atc.Rest.MinimalApi/Atc.Rest.MinimalApi.csproj
index 92130d4..634b80e 100644
--- a/src/Atc.Rest.MinimalApi/Atc.Rest.MinimalApi.csproj
+++ b/src/Atc.Rest.MinimalApi/Atc.Rest.MinimalApi.csproj
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 68b212b..93e4ae2 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -53,7 +53,7 @@
-
+
diff --git a/test/.editorconfig b/test/.editorconfig
index 9184562..d691d61 100644
--- a/test/.editorconfig
+++ b/test/.editorconfig
@@ -27,6 +27,7 @@ dotnet_diagnostic.MA0016.severity = none # https://github.com/atc-net
# Microsoft - Code Analysis
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/
dotnet_diagnostic.CA1068.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1068.md
+dotnet_diagnostic.CA1602.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1602.md
dotnet_diagnostic.CA1707.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1707.md
dotnet_diagnostic.CA2007.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA2007.md
diff --git a/test/Atc.Rest.MinimalApi.Tests/Atc.Rest.MinimalApi.Tests.csproj b/test/Atc.Rest.MinimalApi.Tests/Atc.Rest.MinimalApi.Tests.csproj
index af76b47..1c2375e 100644
--- a/test/Atc.Rest.MinimalApi.Tests/Atc.Rest.MinimalApi.Tests.csproj
+++ b/test/Atc.Rest.MinimalApi.Tests/Atc.Rest.MinimalApi.Tests.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/test/Directory.Build.props b/test/Directory.Build.props
index e59d9d5..586e8e3 100644
--- a/test/Directory.Build.props
+++ b/test/Directory.Build.props
@@ -11,7 +11,7 @@
-
+