rspec/rules/S1120/vb6/rule.adoc

44 lines
835 B
Plaintext
Raw Normal View History

2020-06-30 12:47:33 +02:00
include::../description.adoc[]
== Noncompliant Code Example
With an indent size of 2:
2020-06-30 12:47:33 +02:00
----
Public Sub OutputObject(oOutput As Object)
Set oObject = oOutput
If TypeOf oObject Is Form Then
oObject.Cls
ElseIf TypeOf oObject Is PictureBox Then
oObject.Cls
ElseIf TypeOf oObject Is ListBox Then
oObject.Clear
End If
End Sub
----
== Compliant Solution
----
Public Sub OutputObject(oOutput As Object)
Set oObject = oOutput
If TypeOf oObject Is Form Then
oObject.Cls
ElseIf TypeOf oObject Is PictureBox Then
oObject.Cls
ElseIf TypeOf oObject Is ListBox Then
oObject.Clear
End If
End Sub
----
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]