rspec/rules/S107/plsql/rule.adoc

47 lines
982 B
Plaintext
Raw Permalink Normal View History

== Why is this an issue?
2023-08-10 16:54:47 +02:00
Functions and procedures with a long parameter list are difficult to use, as maintainers must figure out the role of each parameter and keep track of their position.
2020-06-30 10:16:44 +02:00
2023-08-10 16:54:47 +02:00
include::noncompliant.adoc[]
2020-06-30 10:16:44 +02:00
2023-08-10 16:54:47 +02:00
The solution can be to:
2023-08-10 16:54:47 +02:00
* Split the function or the procedure into smaller ones
2020-06-30 10:16:44 +02:00
2023-08-10 16:54:47 +02:00
include::split-example.adoc[]
2020-06-30 10:16:44 +02:00
2023-08-10 16:54:47 +02:00
* Find a better data structure for the parameters that group data in a way that makes sense for the specific application domain
2020-06-30 10:16:44 +02:00
2023-08-10 16:54:47 +02:00
include::struct-example.adoc[]
2023-08-10 16:54:47 +02:00
This rule raises an issue when a function or a procedure has more parameters than the provided threshold.
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
=== Parameters
.parameters
****
----
10
----
The maximum number of function and procedure parameters allowed.
****
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]