rspec/rules/S1854/csharp/rule.adoc
2020-12-23 14:59:06 +01:00

17 lines
428 B
Plaintext

include::../description.adoc[]
include::../noncompliant.adoc[]
include::../compliant.adoc[]
== Exceptions
No issue is reported when
* the analyzed method body contains ``try`` blocks,
* a lambda expression captures the local variables, or
* the variable is unused (case covered by Rule S1481)
* initializations to ``-1``, ``0``, ``1``, ``null``, ``true``, ``false``, ``""`` and ``string.Empty``.
include::../see.adoc[]