rspec/rules/S1753/rpg/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

33 lines
751 B
Plaintext

== Why is this an issue?
``++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[]