Skip to content

Commit 9872113

Browse files
committed
Disable CA1711, CA1721, S125 in Test.ruleset.
- CA1711: test classes commonly use suffixes like Impl, Handler, etc. - CA1721: test interfaces intentionally have properties matching methods. - S125: commented-out code in tests is acceptable for examples/notes.
1 parent 19d2bda commit 9872113

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

build/Test.ruleset

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
<!-- Remove underscores from member name - test naming conventions use underscore. -->
2424
<Rule Id="CA1707" Action="None" />
2525
<!-- Internal class that appears to never be instantiated - false positives from DI. -->
26+
<!-- Identifiers should not have incorrect suffix - test classes use Impl, Handler, etc. -->
27+
<Rule Id="CA1711" Action="None" />
28+
<!-- Property names should not match get methods - aggregate service tests intentionally test both. -->
29+
<Rule Id="CA1721" Action="None" />
2630
<Rule Id="CA1812" Action="None" />
2731
<!-- Change Dispose() to call GC.SuppressFinalize - unimportant in tests. -->
2832
<Rule Id="CA1816" Action="None" />
@@ -55,6 +59,8 @@
5559
<!-- Don't use hardcoded paths or URIs - needed in several test cases. -->
5660
<Rule Id="S1075" Action="None" />
5761
<!-- Utility class should not be instantiated - test fixture classes with nested tests can't be static. -->
62+
<!-- Sections of code should not be commented out - test files may retain commented examples. -->
63+
<Rule Id="S125" Action="None" />
5864
<Rule Id="S1118" Action="None" />
5965
<!-- Don't call GC.Collect - required for weak reference and disposal tests. -->
6066
<Rule Id="S1215" Action="None" />

0 commit comments

Comments
 (0)