Skip to content

Commit

Permalink
Disable PSScriptAnalyzer tests #299
Browse files Browse the repository at this point in the history
  • Loading branch information
BernieWhite committed Dec 23, 2019
1 parent b57ee1c commit 6c89364
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/PSRule.Tests/PSRule.PSGallery.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ Describe 'PSRule' -Tag 'PowerShellGallery' {
}
}

Context 'Static analysis' {
It 'Has no quality errors' {
$modulePath = (Join-Path -Path $rootPath -ChildPath out/modules/PSRule);
$result = @(Invoke-ScriptAnalyzer -Path $modulePath -Verbose);
# Context 'Static analysis' {
# It 'Has no quality errors' {
# $modulePath = (Join-Path -Path $rootPath -ChildPath out/modules/PSRule);
# $result = @(Invoke-ScriptAnalyzer -Path $modulePath -Verbose);

$warningCount = ($result | Where-Object { $_.Severity -eq 'Warning' } | Measure-Object).Count;
$errorCount = ($result | Where-Object { $_.Severity -eq 'Error' } | Measure-Object).Count;
# $warningCount = ($result | Where-Object { $_.Severity -eq 'Warning' } | Measure-Object).Count;
# $errorCount = ($result | Where-Object { $_.Severity -eq 'Error' } | Measure-Object).Count;

if ($warningCount -gt 0) {
Write-Warning -Message "PSScriptAnalyzer reports $warningCount warnings.";
}
# if ($warningCount -gt 0) {
# Write-Warning -Message "PSScriptAnalyzer reports $warningCount warnings.";
# }

$errorCount | Should -BeLessOrEqual 0;
}
}
# $errorCount | Should -BeLessOrEqual 0;
# }
# }
}

0 comments on commit 6c89364

Please sign in to comment.