Closed rvanbekkum closed 2 years ago
Related to #6456
I think this should already work through AA0131, but it does not with the latest AL Language Extension (6.5.413786).
I see: if the procedure is not used yet, then no further static code analysis is applied to its implementation. Maybe this is by design though. If that is the case, then we can simply close this issue.
Updated the title accordingly.
Thanks for reporting this issue. Sorry we haven’t completed it yet, but we’ve had to prioritize elsewhere. We’re planning to give the CodeCop engine and its rules an overhaul in a future major release. Thanks for your patience.
Edited Description (23-03-2022):
If a local procedure is not used, then no code analysis is applied to its implementation.
Original description:
Title A new code analysis rule that warns developers if arguments for values for label placeholders are missing where they would be expected.
Description If there is a label with placeholders then when it is used in procedures/methods like
StrSubstNo
,Message
andError
, a code analysis rule would warn developers when there are insufficient arguments as values for the placeholders in the label.Reason for the rule It is hard to spot this error, you typically only find out about it later at runtime.
Bad code sample Example of what bad code the rule should catch:
Good code sample Example of what code should look like: