AGENT SKILL

AL 代码分析检查

run-al-code-analysis

通过公开的预发布版 ALTool,对临时项目运行 CodeCop、PerTenantExtensionCop、UICop 或 AppSourceCop 代码分析。

License 许可
MIT
所属仓库
microsoft/AL
最近更新
2026-10-21
Stars
★ 889
Forks
286

01 前言 Front Matter

name
run-al-code-analysis
description
Runs CodeCop, PerTenantExtensionCop, UICop, or AppSourceCop against a temporary project through the public prerelease ALTool.
argument-hint
<project-folder> <analyzer>

03 SKILL.md 正文

  1. Invoke verify-prerelease-altool.
  2. Invoke download-al-symbols when the project has symbol references.
  3. Create a temporary .code-workspace through:
    & $env:ALTOOL_PATH workspace create $workspaceFile $projectPath
    
  4. Run the requested analyzer with ALTool workspace compile:
    & $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.
  5. 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.
  6. Exercise both the reported case and the nearest valid control case when feasible.

04 同仓库更多 Skills