Files
mus65 4e02502bdf Add .NET 10 target and make use of C#14 extension members (#1672)
* Add .NET 10 target

* fix IDE0031

https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0031

* fix ca5399

https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5399

* fix ca1515

https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1515

* fix ca2002

https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2002

* fix ca1508

new false positives.

https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1508

* fix ca2000

https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2000

* fix ca2025

https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2025

* fix ca1849

https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1849

* fix Reverse() overloads

because of https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/10.0/csharp-overload-resolution

* supress CA2002

* Use extension members for ThrowHelpers

* use extension members for CryptoAbstractions

* use extension member for DateTime.UnixEpoch

* use extension members for string.Join etc

* use extension members for Convert.To/FromHexString

* disable CA1508

* Update .NET 10 RC2

* Workaround Build Regression in .NET 10 RC2

https://github.com/dotnet/sdk/issues/51265

* suppress new warnings introduced by merge

* Update to .NET 10 final release

* Revert "Workaround Build Regression in .NET 10 RC2"

This is fixed in the final release.

This reverts commit 5a59ac9aa8.

* fix new warnings with MSTest 4 + .NET 10

* use same Randomizer instance

* disable CA2000

* reduce CA1849 suppressions

and disable duplicate S6966

* disable preview analyzers

reverts 6c3c06d95a
2025-11-15 12:21:49 +01:00

80 lines
3.4 KiB
INI

[*.cs]
spelling_languages = en-us,en-gb
spelling_exclusion_path = ../../exclusion.dic
spelling_checkable_types = identifiers,comments
#### Sonar rules ####
# S125: Sections of code should not be commented out
https://rules.sonarsource.com/csharp/RSPEC-125/
dotnet_diagnostic.S125.severity = suggestion
# S1118: Utility classes should not have public constructors
# https://rules.sonarsource.com/csharp/RSPEC-1118/
dotnet_diagnostic.S1118.severity = suggestion
# S1450: Private fields only used as local variables in methods should become local variables
# https://rules.sonarsource.com/csharp/RSPEC-1450/
dotnet_diagnostic.S1450.severity = suggestion
# S4144: Methods should not have identical implementations
# https://rules.sonarsource.com/csharp/RSPEC-4144/
dotnet_diagnostic.S4144.severity = suggestion
#### SYSLIB diagnostics ####
#### StyleCop Analyzers rules ####
# SA1028: Code must not contain trailing whitespace
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1028.md
dotnet_diagnostic.SA1028.severity = suggestion
# SA1414: Tuple types in signatures should have element names
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1414.md
dotnet_diagnostic.SA1414.severity = suggestion
# SA1400: Access modifier must be declared
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1400.md
dotnet_diagnostic.SA1400.severity = suggestion
# SA1401: Fields must be private
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1401.md
dotnet_diagnostic.SA1401.severity = suggestion
# SA1411: Attribute constructor must not use unnecessary parenthesis
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1411.md
dotnet_diagnostic.SA1411.severity = suggestion
# SA1505: Opening braces must not be followed by blank line
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1505.md
dotnet_diagnostic.SA1505.severity = suggestion
# SA1512: Single line comments must not be followed by blank line
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1512.md
dotnet_diagnostic.SA1512.severity = suggestion
# SA1513: Closing brace must be followed by blank line
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1513.md
dotnet_diagnostic.SA1513.severity = suggestion
#### Meziantou.Analyzer rules ####
# MA0003: Add parameter name to improve readability
# https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0003.md
dotnet_diagnostic.MA0003.severity = suggestion
# MA0053: Make class sealed
# https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0053.md
dotnet_diagnostic.MA0053.severity = suggestion
#### .NET Compiler Platform analysers rules ####
# Error CS8892: Method 'TestingPlatformEntryPoint.Main(string[])' will not be used as an entry point because a synchronous entry point 'Program.Main(string[])' was found.
# https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/warning-waves#cs8892---method-will-not-be-used-as-an-entry-point-because-a-synchronous-entry-point-method-was-found
dotnet_diagnostic.CS8892.severity = suggestion
# CA1515: Consider making public types internal
# https://learn.microsoft.com/en-ca/dotnet/fundamentals/code-analysis/quality-rules/ca1515
dotnet_diagnostic.CA1515.severity = silent