LinterCop

LinterCop inspects procedure bodies for code that is valid but harder to read, change or keep fast than it needs to be: cognitive complexity, redundant statements, patterns with a modern AL replacement. Nothing breaks when a LinterCop rule is ignored; the cost lands on whoever maintains the code next. It is the ALCops counterpart of the linters used in other languages, and the direct continuation of BusinessCentral.LinterCop .

Rules

IDTitleSeverityEnabledCode Fix
LC0003Do not use Object IDs as object referencesWarning
LC0007Maintainability Index metricHidden
LC0008Maintainability Index threshold exceededWarning
LC0009Cyclomatic Complexity metricInfo
LC0010Cyclomatic Complexity threshold exceededWarning
LC0019DataClassification redundancyWarning
LC0020ApplicationArea redundancyInfo
LC0028Use identifier syntax in event subscriber argumentsWarning
LC0031Use ReadIsolation instead of LockTableInfo
LC0033App manifest runtime is behind target versionWarning
LC0040Explicitly set RunTriggerInfo
LC0043Use SecretText for sensitive textWarning
LC0048Use Error with ErrorInfo or Label instead of TextWarning
LC0052Internal procedure not referencedWarning
LC0053Internal procedure only used in current objectWarning
LC0054Interface object name guideHidden
LC0063API page canonical field name guideInfo
LC0081Use IsEmpty method instead of CountWarning
LC0082Use Query or Find with Next instead of CountInfo
LC0083Use new Date/Time/DateTime methods for extracting partsInfo
LC0086Page style should not use string literalWarning
LC0088Prefer Enum over Option typeInfo
LC0089Cognitive Complexity metricHidden
LC0090Cognitive Complexity threshold exceededWarning
LC0091Translatable text should be translatedWarning
LC0092Name does not match naming conventionWarning
LC0094AllowInCustomizations redundancyWarning
LC0095Parameter is not referencedWarning
LC0096Unnecessary record parameter in method callWarning
LC0097Avoid mixing exit() and named return variable assignmentsInfo
LC0098Event subscriber name does not match the configured templateInfo
LC0099Event subscriber parameter is not referencedInfo