rspec/rules/S1120/vb6/rule.adoc

75 lines
1.3 KiB
Plaintext
Raw Normal View History

include::../introduction.adoc[]
== Why is this an issue?
include::../why.adoc[]
=== What is the potential impact?
include::../impact.adoc[]
== How to fix it
2020-06-30 12:47:33 +02:00
include::../how-to-fix.adoc[]
=== Code examples
==== Noncompliant code example
2020-06-30 12:47:33 +02:00
With an indent size of 2:
[source,vb6,diff-id=1,diff-type=noncompliant]
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
2020-06-30 12:47:33 +02:00
[source,vb6,diff-id=1,diff-type=compliant]
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
----
ifdef::env-github,rspecator-view[]
=== Going the extra mile
include::../extra-mile.adoc[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Correct the indentation of this and the following X lines. This line should start at column Y.
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]