rspec/rules/S1126/vb6/rule.adoc
2022-02-04 16:28:24 +00:00

39 lines
629 B
Plaintext

Return of boolean literal statements wrapped into ``++If-Then-Else++`` ones should be simplified.
== Noncompliant Code Example
[source,vb6]
----
Function MyFunction
If condition Then
MyFunction = True
Else
MyFunction = False
End If
End Function
----
== Compliant Solution
[source,vb6]
----
Function MyFunction
MyFunction = condition
End Function
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]