mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-09-10 09:15:47 +00:00
933613e31c
* Update to MSTest 4 * fix TestMethodForPlatformAttribute replace Execute with ExecuteAsync and fix MSTEST0057 https://learn.microsoft.com/en-us/dotnet/core/testing/mstest-analyzers/mstest0057 (link currently dead) * fix compilation error * fix MSTEST0037 https://learn.microsoft.com/en-us/dotnet/core/testing/mstest-analyzers/mstest0037 * fix MSTEST0052 https://learn.microsoft.com/en-us/dotnet/core/testing/mstest-analyzers/mstest0052 * fix MSTEST0045 Fixing this properly would require the tests to respect testContext.CancellationToken. I'm not sure this is worth fixing or how to even do it for the sync methods. https://learn.microsoft.com/en-us/dotnet/core/testing/mstest-analyzers/mstest0045 * fix MSTEST0001 I assume that parallelization would break a lot of stuff. https://learn.microsoft.com/en-us/dotnet/core/testing/mstest-analyzers/mstest0001 * Workaround for new Sonar warnings because of MSTest4 * revert analyzer fixes in OrderedDictionaryTest * use custom sync console logger for MSTest to work around https://github.com/microsoft/testfx/issues/6457 * remove redundant args --------- Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com> Co-authored-by: Rob Hague <rob.hague00@gmail.com>
162 lines
5.1 KiB
INI
162 lines
5.1 KiB
INI
[*.cs]
|
|
spelling_languages = en-us,en-gb
|
|
spelling_exclusion_path = ../exclusion.dic
|
|
spelling_checkable_types = identifiers,comments
|
|
|
|
#### Sonar rules ####
|
|
|
|
# S1215: ""GC.Collect" should not be called
|
|
# https://rules.sonarsource.com/csharp/RSPEC-1215
|
|
dotnet_diagnostic.S1215.severity = none
|
|
|
|
# S1854: Unused assignments should be removed
|
|
# https://rules.sonarsource.com/csharp/RSPEC-1854
|
|
#
|
|
# We sometimes increment the value of a variable on each use to make the code future-proof.
|
|
#
|
|
# For example:
|
|
# int idSequence = 0;
|
|
# var train1 = new Train { Id = ++idSequence };
|
|
# var train2 = new Train { Id = ++idSequence };
|
|
#
|
|
# The increment of 'idSequence' in the last line will cause this diagnostic to be reported. We prefer to keep the increment to make
|
|
# sure the value of the variable will remain correct when we introduce a 'train3'.
|
|
#
|
|
# For unit tests, we do not care about this diagnostic.
|
|
dotnet_diagnostic.S1854.severity = none
|
|
|
|
# S3966: Objects should not be disposed more than once
|
|
dotnet_diagnostic.S3966.severity = suggestion
|
|
|
|
#### Meziantou.Analyzer rules ####
|
|
|
|
# MA0089: Optimize string method usage
|
|
# https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0089.md
|
|
dotnet_diagnostic.MA0089.severity = suggestion
|
|
|
|
#MA0136 - Raw String contains an implicit end of line character
|
|
dotnet_diagnostic.MA0136.severity = none
|
|
|
|
#### StyleCop rules ####
|
|
|
|
# SA1202: Elements must be ordered by access
|
|
dotnet_diagnostic.SA1202.severity = none
|
|
|
|
# SA1600: Elements must be documented
|
|
#
|
|
# For unit test projects, we do not care about documentation.
|
|
dotnet_diagnostic.SA1600.severity = none
|
|
|
|
# SA1601: Partial elements should be documented
|
|
#
|
|
# For unit test projects, we do not care about documentation.
|
|
dotnet_diagnostic.SA1601.severity = none
|
|
|
|
# SA1602: Enumeration items must be documented
|
|
#
|
|
# For unit test projects, we do not care about documentation.
|
|
dotnet_diagnostic.SA1602.severity = none
|
|
|
|
# SA1604: Element documentation should have summary
|
|
#
|
|
# TODO: Remove this when code has been updated!
|
|
dotnet_diagnostic.SA1604.severity = none
|
|
|
|
# SA1606: Element documentation should have summary text
|
|
#
|
|
# TODO: Remove this when code has been updated!
|
|
dotnet_diagnostic.SA1606.severity = none
|
|
|
|
# SA1607: Partial element documentation should have summary text
|
|
#
|
|
# For unit test projects, we do not care about documentation.
|
|
dotnet_diagnostic.SA1607.severity = none
|
|
|
|
# SA1611: Element parameters must be documented
|
|
#
|
|
# For unit test projects, we do not care about documentation.
|
|
dotnet_diagnostic.SA1611.severity = none
|
|
|
|
# SA1614: Element parameter documentation must have text
|
|
#
|
|
# TODO: Remove this when code has been updated!
|
|
dotnet_diagnostic.SA1614.severity = none
|
|
|
|
# SA1615: Element return value must be documented
|
|
#
|
|
# For unit test projects, we do not care about documentation.
|
|
dotnet_diagnostic.SA1615.severity = none
|
|
|
|
# SA1616: Element return value documentation should have text
|
|
#
|
|
# TODO: Remove this when code has been updated!
|
|
dotnet_diagnostic.SA1616.severity = none
|
|
|
|
# SA1623: Property summary documentation must match accessors
|
|
#
|
|
# TODO: Remove this when code has been updated!
|
|
dotnet_diagnostic.SA1623.severity = none
|
|
|
|
# SA1629: Documentation text must end with a period
|
|
#
|
|
# For unit test projects, we do not care about documentation.
|
|
dotnet_diagnostic.SA1629.severity = none
|
|
|
|
# Workaround https://github.com/SonarSource/sonar-dotnet/issues/9767
|
|
dotnet_diagnostic.S1450.severity = none
|
|
dotnet_diagnostic.S1764.severity = none
|
|
dotnet_diagnostic.S3260.severity = none
|
|
dotnet_diagnostic.S5445.severity = none
|
|
|
|
#### .NET Compiler Platform analysers rules ####
|
|
|
|
# CA1001: Types that own disposable fields should be disposable
|
|
#
|
|
# We do not care about this for unit tests.
|
|
dotnet_diagnostic.CA1001.severity = none
|
|
|
|
# CA1707: Identifiers should not contain underscores
|
|
#
|
|
# We frequently use underscores in test classes and test methods.
|
|
dotnet_diagnostic.CA1707.severity = none
|
|
|
|
# CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
|
|
# https://learn.microsoft.com/en-US/dotnet/fundamentals/code-analysis/quality-rules/ca1824
|
|
#
|
|
# We do not care (much) about performance for tests.
|
|
dotnet_diagnostic.CA1824.severity = none
|
|
|
|
# CA1835: Prefer the memory-based overloads of ReadAsync/WriteAsync methods in stream-based classes
|
|
# https://learn.microsoft.com/en-US/dotnet/fundamentals/code-analysis/quality-rules/ca1835
|
|
#
|
|
# We do not care about this for unit tests.
|
|
dotnet_diagnostic.CA1835.severity = none
|
|
|
|
# CA1711: Identifiers should not have incorrect suffix
|
|
#
|
|
# We frequently define test classes and test method with a suffix that refers to a type.
|
|
dotnet_diagnostic.CA1711.severity = none
|
|
|
|
# CA1720: Identifiers should not contain type names
|
|
#
|
|
# We do not care about this for unit tests.
|
|
dotnet_diagnostic.CA1720.severity = none
|
|
|
|
# CA1861: Avoid constant arrays as arguments
|
|
#
|
|
# We do not care about this for unit tests.
|
|
dotnet_diagnostic.CA1861.severity = none
|
|
|
|
# CA5351: Do not use broken cryptographic algorithms
|
|
#
|
|
# We do not care about this for unit tests.
|
|
dotnet_diagnostic.CA5351.severity = none
|
|
|
|
# CA5394: Do not use insecure randomness
|
|
#
|
|
# We do not care about this for unit tests.
|
|
dotnet_diagnostic.CA5394.severity = none
|
|
|
|
# IDE0078: Use pattern matching (may change code meaning)
|
|
dotnet_diagnostic.IDE0078.severity = none
|