
## Review A dedicated reviewer checked the rule description successfully for: - [ ] logical errors and incorrect information - [ ] information gaps and missing content - [ ] text style and tone - [ ] PR summary and labels follow [the guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
67 lines
1.2 KiB
Plaintext
67 lines
1.2 KiB
Plaintext
== Why is this an issue?
|
|
|
|
:operationName: procedure
|
|
|
|
include::../description.adoc[]
|
|
|
|
== How to fix it
|
|
|
|
=== Code examples
|
|
|
|
==== Noncompliant code example
|
|
|
|
[source,vb6,diff-id=1,diff-type=noncompliant]
|
|
----
|
|
Sub ShouldNotBeEmpty() ' Noncompliant - method is empty
|
|
End Sub
|
|
|
|
Sub NotImplementedYet() ' Noncompliant - method is empty
|
|
End Sub
|
|
|
|
Sub WillNeverBeImplemented() ' Noncompliant - method is empty
|
|
End Sub
|
|
|
|
Sub EmptyOnPurpose() ' Noncompliant - method is empty
|
|
End Sub
|
|
----
|
|
|
|
==== Compliant solution
|
|
|
|
[source,vb6,diff-id=1,diff-type=compliant]
|
|
----
|
|
Sub ShouldNotBeEmpty()
|
|
DoSomething()
|
|
End Sub
|
|
|
|
Sub NotImplementedYet()
|
|
Err.Raise(1, , "NotImplemented")
|
|
End Sub
|
|
|
|
Sub WillNeverBeImplemented()
|
|
Err.Raise(1, , "NotSupported")
|
|
End Sub
|
|
|
|
Sub EmptyOnPurpose()
|
|
' comment explaining why the method is empty
|
|
End Sub
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
Add a nested comment explaining why this method is empty, throw an error or complete the implementation.
|
|
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|