rspec/rules/S1702/vb6/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

36 lines
721 B
Plaintext

== Why is this an issue?
Variables declared without the explicit specification of a data type are ``++Variants++``. Variants can be inefficient to use because at each interaction they are converted to the appropriate type for that interaction. Variants may be required for COM interactions, but even then their type should be specified explicitly.
=== Noncompliant code example
[source,vb6]
----
Dim Count
Dim Bool
----
=== Compliant solution
[source,vb6]
----
Dim Count As Integer
Dim Bool As Boolean
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Declare the data type of "XXX" using the "AS" keyword
endif::env-github,rspecator-view[]