rspec/rules/S107/description.adoc
2024-01-29 14:28:14 +01:00

19 lines
606 B
Plaintext

== Why is this an issue?
{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.
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.