Fix enableCodeAnalyzersOnTestApps not disabling customCodeCops in workspace compilation (#2323)
## Why Under workspace compilation (`workspaceCompilation.enabled: true`), setting `enableCodeAnalyzersOnTestApps: false` was supposed to stop all analyzers from running against test and BCPT test apps. It correctly disabled the built-in cops (CodeCop, AppSourceCop, PTECop, UICop) but left custom analyzers (`customCodeCops`) running, so custom analyzer DLLs kept producing diagnostics against test apps. This contradicted the documented behavior and the classic `Run-AlPipeline` container flow. ## What changed In `Actions/CompileApps/Compile.ps1`, the `CustomAnalyzers` build parameter is now cleared alongside `Analyzers` in both the test-folder and BCPT-test-folder branches when `enableCodeAnalyzersOnTestApps` is false. Previously only `Analyzers` was reset; `CustomAnalyzers` was computed once before the compile steps and never cleared. `$buildParams` is a shared mutable hashtable and the regular app-folder branch compiles first, so clearing the analyzers in the test branches does not affect normal app compilation. ## Tests Added two regression tests to the existing `CompileAppsInWorkspace argument construction` suite in `Tests/CompileFromWorkspace.Test.ps1`, verifying the module emits `--customanalyzers` when custom analyzers are supplied and omits it when the list is empty. The full argument-construction suite (8 tests) passes locally. No settings schema or `Scenarios/settings.md` changes were needed since this aligns the behavior with the already-documented meaning of the setting. Fixes: #2319 Co-authored-by: aholstrup1 <aholstrup1@users.noreply.github.com>
A
Alexander Holstrup committed
1150d93046c5e705683771a8d33c51f7f9b7d06f
Parent: c972648
Committed by GitHub <noreply@github.com>
on 7/21/2026, 7:11:45 AM