rspec/rules/S1753/rpg/rule.adoc

33 lines
751 B
Plaintext
Raw Permalink Normal View History

== Why is this an issue?
2021-04-28 16:49:39 +02:00
``++IF++`` blocks that contain too many lines are difficult to read and understand.
Above a specific threshold, it is strongly advised to refactor the contents of the ``++IF++`` block into multiple, well-named subroutines or subfunctions, each of which focuses on a well-defined task. Those smaller subroutines will not only be easier to understand, but probably also easier to test.
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Reduce the number of lines in this "IF" block from XX to at most YY
=== Parameters
.max_if_lines
****
----
48
----
The maximum number of lines of code allowed in an "IF" block
****
endif::env-github,rspecator-view[]