rspec/rules/S107/vbnet/rule.adoc

56 lines
1.1 KiB
Plaintext
Raw Normal View History

2023-08-10 16:54:47 +02:00
:language: vbnet
2023-08-10 16:54:47 +02:00
:function: procedure
:upper_function: Procedure
2020-06-30 10:16:44 +02:00
2023-08-10 16:54:47 +02:00
include::../description.adoc[]
2020-06-30 10:16:44 +02:00
2023-08-10 16:54:47 +02:00
=== Exceptions
2020-06-30 10:16:44 +02:00
2023-08-10 16:54:47 +02:00
The rule does not count the parameters intended for a base class constructor.
2020-06-30 10:16:44 +02:00
2023-08-10 16:54:47 +02:00
With a maximum number of 4 parameters:
2020-06-30 10:16:44 +02:00
2022-02-04 17:28:24 +01:00
[source,vbnet]
2020-06-30 10:16:44 +02:00
----
2023-08-10 16:54:47 +02:00
Class BaseClass
2023-08-10 16:54:47 +02:00
Sub New(Param1 As Integer)
' ...
End Sub
2023-08-10 16:54:47 +02:00
End Class
2023-08-10 16:54:47 +02:00
Class DerivedClass
Inherits BaseClass
Public Sub New(Param1 As Integer, Param2 As Integer, Param3 As Integer, Param4 As Integer, Param5 As Long)
2023-08-10 16:54:47 +02:00
' Compliant by exception: Param1 is used in the base class constructor, so it does not count in the sum of the parameter list.
MyBase.New(Param1)
' ...
End Sub
End Class
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
[Constructor|Function|Sub|Delegate|Lambda] has {0} parameters, which is greater than the {1} authorized.
include::../parameters.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]