rspec/rules/S1854/csharp/rule.adoc
2021-01-27 13:42:22 +01:00

17 lines
464 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[]