rspec/rules/S107/description.adoc

19 lines
606 B
Plaintext
Raw Normal View History

2023-08-10 16:54:47 +02:00
== Why is this an issue?
2024-01-29 14:28:14 +01:00
{upper_function}s with a long parameter list are difficult to use because maintainers must figure out the role of each parameter and keep track of their position.
2023-08-10 16:54:47 +02:00
include::{language}/noncompliant.adoc[]
The solution can be to:
* Split the {function} into smaller ones
include::{language}/split-example.adoc[]
* Find a better data structure for the parameters that group data in a way that makes sense for the specific application domain
include::{language}/struct-example.adoc[]
This rule raises an issue when a {function} has more parameters than the provided threshold.