diff --git a/rules/S104/rpg/metadata.json b/rules/S104/rpg/metadata.json index c6f2fc9c71..1797133380 100644 --- a/rules/S104/rpg/metadata.json +++ b/rules/S104/rpg/metadata.json @@ -1,3 +1,3 @@ { - "title": "Files should not have too many lines" + } diff --git a/rules/S104/rpg/rule.adoc b/rules/S104/rpg/rule.adoc index 9987aa501a..a73deaa3f6 100644 --- a/rules/S104/rpg/rule.adoc +++ b/rules/S104/rpg/rule.adoc @@ -6,7 +6,9 @@ ifdef::env-github,rspecator-view[] == Implementation Specification (visible only on this page) -include::../message.adoc[] +=== Message + +File "XXXX" has {0} lines of code, which is greater than {1} authorized. Split it into smaller files. include::../parameters.adoc[] diff --git a/rules/S1151/rpg/metadata.json b/rules/S1151/rpg/metadata.json index 93f7fdf107..10e8828619 100644 --- a/rules/S1151/rpg/metadata.json +++ b/rules/S1151/rpg/metadata.json @@ -1,3 +1,3 @@ { - "title": "\"SELECT WHEN\" clauses should not have too many lines" + "title": "\"SELECT WHEN\" clauses should not have too many lines of code" } diff --git a/rules/S1151/rpg/rule.adoc b/rules/S1151/rpg/rule.adoc index dbd43fe996..61efe89e74 100644 --- a/rules/S1151/rpg/rule.adoc +++ b/rules/S1151/rpg/rule.adoc @@ -4,6 +4,9 @@ The ``++SELECT++`` statement should be used only to clearly define some new bran === Noncompliant code example +With the default threshold of 5: + + [source,rpg] ---- C SELECT @@ -64,7 +67,9 @@ ifdef::env-github,rspecator-view[] == Implementation Specification (visible only on this page) -include::../message.adoc[] +=== Message + +Reduce this "[WHEN|OTHER]" number of lines of code from {} to at most {}, for example by extracting code into a [method|subroutine|function]. include::../parameters.adoc[] diff --git a/rules/S138/rpg/metadata.json b/rules/S138/rpg/metadata.json index d6bf935586..2a555e7c3b 100644 --- a/rules/S138/rpg/metadata.json +++ b/rules/S138/rpg/metadata.json @@ -1,3 +1,3 @@ { - "title": "Subroutines should not have too manylines" + "title": "Subroutines should not have too many lines of code" } diff --git a/rules/S1752/rpg/rule.adoc b/rules/S1752/rpg/rule.adoc index 72b36e9e65..b5c125269e 100644 --- a/rules/S1752/rpg/rule.adoc +++ b/rules/S1752/rpg/rule.adoc @@ -1,6 +1,6 @@ == Why is this an issue? -``++DO++`` blocks that contain too many lines are difficult to read and understand. +``++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. @@ -13,7 +13,7 @@ ifdef::env-github,rspecator-view[] === Message -Reduce the number of lines in this "DO" block from XX to at most YY +Reduce the number of lines of code in this "DO" block from XX to at most YY === Parameters diff --git a/rules/S1753/rpg/rule.adoc b/rules/S1753/rpg/rule.adoc index 67fe277fc9..ec2f3db34a 100644 --- a/rules/S1753/rpg/rule.adoc +++ b/rules/S1753/rpg/rule.adoc @@ -1,6 +1,6 @@ == Why is this an issue? -``++IF++`` blocks that contain too many lines are difficult to read and understand. +``++IF++`` 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 ``++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. @@ -13,7 +13,7 @@ ifdef::env-github,rspecator-view[] === Message -Reduce the number of lines in this "IF" block from XX to at most YY +Reduce the number of lines of code in this "IF" block from XX to at most YY === Parameters