rspec/rules/S1977/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

31 lines
732 B
Plaintext

== Why is this an issue?
Using a named constant to refer to an indicator makes the content of the field clearer, and therefore makes the code easier to read and maintain.
=== Compliant solution
[source,rpg]
----
D accountTotal c 25
/Free
If *In(accountTotal);
// Process contents...
EndIf;
----
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
=== duplicates: S109
=== on 19 Sep 2014, 11:33:01 Freddy Mallet wrote:
@Ann, is there is big difference with the rule "Magic numbers should not be used" : RSPEC-109 ? I would have decreased the SQALE remediation cost from 20 minutes to 5 minutes.
endif::env-github,rspecator-view[]