LinterCop

The LinterCop is a code linter for AL, comparable to widely used static analysis linters in other programming languages. It flags code quality issues, measures complexity, and promotes modern AL patterns. The code it flags is technically valid, but can be written in a cleaner, more maintainable or more idiomatic way.

Rules

IDTitleSeverityEnabledCode Fix
LC0003Object ID should not be in declarationInfo
LC0007Maintainability Index metricInfo
LC0008Maintainability Index threshold exceededWarning
LC0009Cyclomatic Complexity metricInfo
LC0010Cyclomatic Complexity threshold exceededWarning
LC0019DataClassification redundancyInfo
LC0020ApplicationArea redundancyInfo
LC0028Identifiers in event subscribersWarning
LC0031Record instance isolation levelWarning
LC0033App manifest runtime behindWarning
LC0040Explicitly set RunTriggerInfo
LC0043Use SecretText for sensitive textWarning
LC0048Error invocation using text constantWarning
LC0052Internal procedure not referencedWarning
LC0053Internal procedure only used in current objectInfo
LC0054Interface object name guideInfo
LC0063API page canonical field name guideInfo
LC0081Use IsEmpty method instead of CountInfo
LC0082Use Query or Find with Next instead of CountInfo
LC0083Use built-in date/time methodsInfo
LC0086Page style should not use string literalWarning
LC0088Option type should be EnumInfo
LC0089Cognitive Complexity metricInfo
LC0090Cognitive Complexity threshold exceededWarning
LC0094AllowInCustomizations redundancyWarning