rspec/rules/S1186/vb6/rule.adoc

29 lines
615 B
Plaintext
Raw Normal View History

There are several reasons for a method not to have a method body:
2021-02-02 15:02:10 +01:00
* It is an unintentional omission, and should be fixed.
* It is not yet, or never will be, supported. In this case an error should be thrown.
* The method is an intentionally-blank. In this case a nested comment should explain the reason for the blank method.
== Noncompliant Code Example
----
Sub DoSomething()
End Sub
Function DoSomething() As String
End Function
----
== Compliant Solution
----
Sub DoSomething()
' Not implemented because of reason
End Sub
Function DoSomething() As String
DoSomething = "Value"
End Function
----