rspec/rules/S1125/vb6/rule.adoc

41 lines
699 B
Plaintext
Raw Normal View History

2023-10-13 13:50:06 +02:00
:true: True
:false: False
:ops: Not, And, Or, =
== Why is this an issue?
include::../description.adoc[]
2023-10-13 13:50:06 +02:00
=== Code examples
2023-10-13 13:50:06 +02:00
==== Noncompliant code example
[source,vb6,diff-id=1,diff-type=noncompliant]
----
If BooleanVariable = True Then ...
If BooleanVariable <> True Then ...
If BooleanVariable OR False Then ...
DoSomething(Not False)
----
2023-10-13 13:50:06 +02:00
==== Compliant solution
2023-10-13 13:50:06 +02:00
[source,vb6,diff-id=1,diff-type=compliant]
----
If BooleanVariable Then ...
If Not BooleanVariable Then ...
If BooleanVariable Then ...
DoSomething(True)
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
'''
endif::env-github,rspecator-view[]