|
148 | 148 | Include this switch to include UI Cop during compilation.
|
149 | 149 | .Parameter enablePerTenantExtensionCop
|
150 | 150 | Only relevant for Per Tenant Extensions. Include this switch to include Per Tenant Extension Cop during compilation.
|
| 151 | +. Parameter enableCodeAnalyzersOnTestApps |
| 152 | + Include this switch to include CodeCops and other analyzers during compilation of test apps. |
151 | 153 | .Parameter customCodeCops
|
152 | 154 | Use custom AL Cops into the container and include them, in addidtion to the default cops, during compilation.
|
153 | 155 | .Parameter useDefaultAppSourceRuleSet
|
@@ -341,6 +343,7 @@ Param(
|
341 | 343 | [switch] $enableAppSourceCop,
|
342 | 344 | [switch] $enableUICop,
|
343 | 345 | [switch] $enablePerTenantExtensionCop,
|
| 346 | + [switch] $enableCodeAnalyzersOnTestApps, |
344 | 347 | $customCodeCops = @(),
|
345 | 348 | [switch] $useDefaultAppSourceRuleSet,
|
346 | 349 | [string] $rulesetFile = "",
|
@@ -452,7 +455,6 @@ function GetInstalledAppIds {
|
452 | 455 | $installedApps = @(GetAppInfo -AppFiles $existingAppFiles -compilerFolder $compilerFolder -cacheAppinfoPath (Join-Path $packagesFolder 'cache_AppInfo.json'))
|
453 | 456 | $compilerFolderAppFiles = @(Get-ChildItem -Path (Join-Path $compilerFolder 'symbols/*.app') | Select-Object -ExpandProperty FullName)
|
454 | 457 | $installedApps += @(GetAppInfo -AppFiles $compilerFolderAppFiles -compilerFolder $compilerFolder -cacheAppinfoPath (Join-Path $compilerFolder 'symbols/cache_AppInfo.json'))
|
455 |
| - |
456 | 458 | }
|
457 | 459 | elseif (!$filesOnly) {
|
458 | 460 | $installedApps = @(Invoke-Command -ScriptBlock $GetBcContainerAppInfo -ArgumentList $Parameters)
|
@@ -681,6 +683,7 @@ Write-Host -NoNewLine -ForegroundColor Yellow "enableCodeCop "
|
681 | 683 | Write-Host -NoNewLine -ForegroundColor Yellow "enableAppSourceCop "; Write-Host $enableAppSourceCop
|
682 | 684 | Write-Host -NoNewLine -ForegroundColor Yellow "enableUICop "; Write-Host $enableUICop
|
683 | 685 | Write-Host -NoNewLine -ForegroundColor Yellow "enablePerTenantExtensionCop "; Write-Host $enablePerTenantExtensionCop
|
| 686 | +Write-Host -NoNewLine -ForegroundColor Yellow "enableCodeAnalyzersOnTestApps "; Write-Host $enableCodeAnalyzersOnTestApps |
684 | 687 | Write-Host -NoNewLine -ForegroundColor Yellow "doNotPerformUpgrade "; Write-Host $doNotPerformUpgrade
|
685 | 688 | Write-Host -NoNewLine -ForegroundColor Yellow "doNotPublishApps "; Write-Host $doNotPublishApps
|
686 | 689 | Write-Host -NoNewLine -ForegroundColor Yellow "uninstallRemovedApps "; Write-Host $uninstallRemovedApps
|
@@ -1639,7 +1642,7 @@ Write-Host -ForegroundColor Yellow @'
|
1639 | 1642 | }
|
1640 | 1643 | }
|
1641 | 1644 |
|
1642 |
| - if ($app) { |
| 1645 | + if ($app -or $enableCodeAnalyzersOnTestApps) { |
1643 | 1646 | $CopParameters += @{
|
1644 | 1647 | "EnableCodeCop" = $enableCodeCop
|
1645 | 1648 | "EnableAppSourceCop" = $enableAppSourceCop
|
|
0 commit comments