Category Archives: AL Statis Code Analysers

Current status of AL Code Analyzers

With the last update of Analyzers Rules, there are some new issues with warnings. This is not a comprehensive list of all bugs but contains information about problems that I found on projects that I am working on / managing.

General Analyzer Rules

  • AL0604 (for Runtimes under 6.0)
    • DESCRIPTION: Use of implicit with
    • AL TEXT: Use of implicit ‘with’ will be removed in the future. Qualify with ‘Rec.’. This warning will become an error in a future release.
    • CURRENT PROBLEM: This warning should be shown (together with linked quick fix) only for Runtime >= 6. For Runtimes below this, some required functionality (like Editable/Enable = Rec.”Field Name”) is not supported.
    • LINKS:

CodeCop Analyzer Rules

  • AA0072
    • DESCRIPTION: The name of variables and parameters must be suffixed with the type or object name.
    • AL TEXT: The name of {0} is not valid. The name of variables and parameters must be suffixed with the type or object name.
    • CURRENT PROBLEM: This rule is still under discussion on AL GIT due to some unexpected/strange behaviour. The most discussed issues are: Whether the company prefix/suffix of the object should be mandatory in variables names; Whether reserved words should be avoided; That subscribers parameters should not be check (as it’s not a problem of subscriber but of published); …
    • LINKS:
  • AA0150
    • DESCRIPTION: Do not declare parameters by reference if their values are never changed.
    • AL TEXT: Parameter ‘{0}’ is declared by reference but never changed in method ‘{1}’.
    • CURRENT PROBLEM: The rule checks parameters in Codeunits that implements interfaces with methods that contain reference parameters. This should not be check.
    • LINKS:
  • AA0232
    • DESCRIPTION: The FlowField of a table should be indexed.
    • AL TEXT: The FlowField {0} of {1} should be added to the SIFT key.
    • CURRENT PROBLEM: The rule does not respect field type and suggests adding SIFT index on non-numeric fields (like date, datetime, …).
    • LINKS:
  • AA0240
    • DESCRIPTION: Email and Phone No must not be present in any part of the source code.
    • AL TEXT: The {0} ‘{1}’ must not contain email addresses or phone numbers.
    • CURRENT PROBLEM: This rule currently checks translation files and evaluate some field (or other) IDs of an object as a phone number.
    • LINKS: