11# ATC coding rules - https://github.com/atc-net/atc-coding-rules
2- # Version: 1.0.1
3- # Updated: 03-06-2024
2+ # Version: 1.0.0
3+ # Updated: 01- 03-2025
44# Location: Root
5- # Distribution: DotNet8
5+ # Distribution: DotNet9
66# Inspired by: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options
77
88# #########################################
@@ -492,6 +492,8 @@ dotnet_diagnostic.CA1867.severity = suggestion # Use char overload
492492dotnet_diagnostic.CA1868.severity = suggestion # Unnecessary call to ' Contains(item)'
493493dotnet_diagnostic.CA1869.severity = suggestion # Cache and reuse ' JsonSerializerOptions' instances
494494dotnet_diagnostic.CA1870.severity = suggestion # Use a cached ' SearchValues' instance
495+ dotnet_diagnostic.CA1871.severity = suggestion # Do not pass a nullable struct to ' ArgumentNullException.ThrowIfNull'
496+ dotnet_diagnostic.CA1872.severity = suggestion # Prefer ' Convert.ToHexString' and ' Convert.ToHexStringLower' over call chains based on ' BitConverter.ToString'
495497dotnet_diagnostic.CA2007.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA2007.md
496498dotnet_diagnostic.CA2017.severity = error # Parameter count mismatch
497499dotnet_diagnostic.CA2018.severity = error # The count argument to Buffer.BlockCopy should specify the number of bytes to copy
@@ -505,6 +507,9 @@ dotnet_diagnostic.CA2255.severity = suggestion # The ModuleInitializer attr
505507dotnet_diagnostic.CA2259.severity = error # Ensure ThreadStatic is only used with static fields
506508dotnet_diagnostic.CA2260.severity = error # Implement generic math interfaces correctly
507509dotnet_diagnostic.CA2261.severity = error # Do not use ConfigureAwaitOptions.SuppressThrowing with Task<TResult>
510+ dotnet_diagnostic.CA2262.severity = suggestion # Set ' MaxResponseHeadersLength' properly
511+ dotnet_diagnostic.CA2263.severity = suggestion # Prefer generic overload when type is known
512+ dotnet_diagnostic.CA2264.severity = error # Do not pass a non-nullable value to ' ArgumentNullException.ThrowIfNull'
508513dotnet_diagnostic.IDE0005.severity = warning # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/IDE0005.md
509514dotnet_diagnostic.IDE0010.severity = suggestion # Populate switch
510515dotnet_diagnostic.IDE0028.severity = suggestion # Collection initialization can be simplified
@@ -557,6 +562,7 @@ dotnet_diagnostic.S3358.severity = none # Extract this nested ternary
557562dotnet_diagnostic.S6602.severity = none # " Find" method should be used instead of the " FirstOrDefault"
558563dotnet_diagnostic.S6603.severity = none # The collection-specific " TrueForAll" method should be used instead of the " All"
559564dotnet_diagnostic.S6605.severity = none # Collection-specific " Exists" method should be used instead of the " Any"
565+ dotnet_diagnostic.S6964.severity = none # Value type property used as input in a controller action should be nullable, required or annotated with the JsonRequiredAttribute to avoid under-posting.
560566
561567
562568# #########################################
0 commit comments