Run al code analysis

From microsoft/AL · View interactive version

Run al code analysis is an AI agent skill from the GitHub repository microsoft/AL. Runs CodeCop, PerTenantExtensionCop, UICop, or AppSourceCop against a temporary project through the public prerelease ALTool.

How to use this skill

Skill file

  1. Invoke verify-prerelease-altool.
  2. Invoke download-al-symbols when the project has symbol references.
  3. Create a temporary .code-workspace through:

```powershell

& $env:ALTOOL_PATH workspace create $workspaceFile $projectPath

```

  1. Run the requested analyzer with ALTool workspace compile:

```powershell

& $env:ALTOOL_PATH workspace compile $workspaceFile `

--packagecachepath (Join-Path $projectPath '.alpackages') `

--analyzers PTECop `

--outfolder $outputFolder `

--errorlogdirectory $errorLogFolder

```

Select only the reported analyzer from AppSourceCop, CodeCop, PTECop, or UICop. Use

--ruleset when the issue supplies one. Never invoke alc.exe.

  1. Preserve the exact diagnostics and exit code. A missing analyzer, ruleset, or symbol package is an

inconclusive setup failure, not evidence that no diagnostic exists.

  1. Exercise both the reported case and the nearest valid control case when feasible.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.