rspec/rules/S1854/csharp/rule.adoc

17 lines
464 B
Plaintext
Raw Normal View History

2020-06-30 12:47:33 +02:00
include::../description.adoc[]
include::../noncompliant.adoc[]
include::../compliant.adoc[]
== Exceptions
No issue is reported when
2021-01-27 13:42:22 +01:00
* the analyzed method body contains ``++try++`` blocks,
2020-06-30 12:47:33 +02:00
* a lambda expression captures the local variables, or
* the variable is unused (case covered by Rule S1481)
2021-01-27 13:42:22 +01:00
* initializations to ``++-1++``, ``++0++``, ``++1++``, ``++null++``, ``++true++``, ``++false++``, ``++""++`` and ``++string.Empty++``.
2020-06-30 12:47:33 +02:00
include::../see.adoc[]