From 6c89364dd885d2f71c5cd47aa2ce8b4118d5fb4e Mon Sep 17 00:00:00 2001 From: Bernie White Date: Mon, 23 Dec 2019 19:14:36 +1000 Subject: [PATCH] Disable PSScriptAnalyzer tests #299 --- tests/PSRule.Tests/PSRule.PSGallery.Tests.ps1 | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/PSRule.Tests/PSRule.PSGallery.Tests.ps1 b/tests/PSRule.Tests/PSRule.PSGallery.Tests.ps1 index f1988aef7e..4ef1251b85 100644 --- a/tests/PSRule.Tests/PSRule.PSGallery.Tests.ps1 +++ b/tests/PSRule.Tests/PSRule.PSGallery.Tests.ps1 @@ -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; + # } + # } }