rspec/rules/S1977/rpg/rule.adoc

31 lines
732 B
Plaintext
Raw Permalink Normal View History

== 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
2022-02-04 17:28:24 +01:00
[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[]