Steeltoe icon indicating copy to clipboard operation
Steeltoe copied to clipboard

Address S2360: Optional parameters should not be used

Open bart-vmware opened this issue 3 years ago • 2 comments

Address existing violations of S2360: Optional parameters should not be used in the codebase and set severity to Warning in Steeltoe.Debug.ruleset and Steeltoe.Release.ruleset.

To find existing violations, enable the rule (see above) and rebuild src/Steeltoe.All.sln to make them appear in the Output window.

To address the violations, choose from the following on a case-by-case basis:

  • Fix the violation by changing the code to not violate the rule
  • Suppress the violation in code using #pragma warning disable/restore, preceded by a justification comment if not obvious

bart-vmware avatar Jul 28 '22 11:07 bart-vmware

As of 5d792a85e72728c3ecfd191ba9c32e3e0bf6843c it looks like there are 908 violations

TimHess avatar Aug 18 '22 21:08 TimHess

Thanks! Sounds like a good reason to postpone addressing this, until we have narrowed down the public API surface. The rule ignores non externally visible methods.

bart-vmware avatar Aug 19 '22 08:08 bart-vmware