Fix S1694 FP: Abstract class with field or constructor #9494
Labels
Area: C#
C# rules related issues.
Sprint: Hardening
Fix FPs/FNs/improvements
Type: False Positive
Rule IS triggered when it shouldn't be.
Milestone
Description
The code below triggers S1694. However, in the case where there is logic using the constructor arguments in the abstract class, it should not be converted to an interface.
Repro steps
Expected behavior
S1694 should not fire as the constructor argument/code makes it unsuitable to convert to an interface. This code could be quite complex and should be shared between all subclasses.
Actual behavior
S1694 does trigger.
Known workarounds
Suppress the issue.
Related information
The text was updated successfully, but these errors were encountered: