Do Cops write tickets in AL?

The AL Language extension (the language for developing applications for Microsoft Dynamics 365 Business Central) contains four code analyzers for analysis of your code at build time.

The AppSourceCop analyzer enforces rules for extensions intended for listing in Microsoft AppSource. Whereas the CodeCop analyzer enforces AL Coding Guidelines and the UICop analyzer enforces rules for the Web Client. The PerTenantExtensionCop analyzer enforces individual tenant rules.

The al.enableCodeAnalysis setting is used to set the state of code analysis and the al.codeanalyzers setting specifies which of the code analyzers to enable.


Note: as with most settings, the al.enableCodeAnalysis and al.codeanalyzers settings may be set for a project, workspace, or development environment.

Once the code analysis is enabled and the code analyzers specified, the Rule Id and Title appear for each file,  in the Problems window of the VS Code editor for any code “violations.”

It is possible to override the behavior of the code analyzer for specific Ids via the use of Pragma and Rulesets; that is for another time.

Note: The code listed in this article is for informational and demonstration purposes only. 

2 pings

  1. […] (the language for developing applications for Microsoft Dynamics 365 Business Central) contains fourcode analyzers for analysis of your code at build time. “Code violations” are displayed in the […]

  2. […] (the language for developing applications for Microsoft Dynamics 365 Business Central) contains fourcode analyzers for analysis of your code at build time. “Code violations” are displayed in the Problem window […]

Leave a Reply

Your email address will not be published.