2023-05-03 11:06:20 +02:00
== Why is this an issue?
2021-06-08 14:23:48 +02:00
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.
2023-05-03 11:06:20 +02:00
=== Compliant solution
2021-06-08 14:23:48 +02:00
2022-02-04 17:28:24 +01:00
[source,rpg]
2021-06-08 14:23:48 +02:00
----
D accountTotal c 25
/Free
If *In(accountTotal);
// Process contents...
EndIf;
----
ifdef::env-github,rspecator-view[]
2021-06-08 15:52:13 +02:00
'''
2021-06-08 14:23:48 +02:00
== Comments And Links
(visible only on this page)
2023-05-25 14:18:12 +02:00
=== 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.
2021-06-08 14:23:48 +02:00
endif::env-github,rspecator-view[]