rspec/rules/S1752/rpg/rule.adoc

33 lines
766 B
Plaintext

== Why is this an issue?
``++DO++`` blocks that contain too many lines of code are difficult to read and understand.
Above a specific threshold, it is strongly advised to refactor the contents of the ``++DO++`` 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 of code in this "DO" block from XX to at most YY
=== Parameters
.max_do_lines
****
----
48
----
The maximum number of lines of code allowed in a "DO" block
****
endif::env-github,rspecator-view[]