@@ -181,15 +181,15 @@ Describe "Test Path" {
181
181
$numFilesResult | Should - Be $numFilesExpected
182
182
}
183
183
}
184
-
184
+
185
185
Context " When piping in files" {
186
186
It " Can be piped in from a string" {
187
187
$piped = (" $directory \TestScript.ps1" | Invoke-ScriptAnalyzer )
188
188
$explicit = Invoke-ScriptAnalyzer - Path $directory \TestScript.ps1
189
-
189
+
190
190
$piped.Count | Should Be $explicit.Count
191
191
}
192
-
192
+
193
193
It " Can be piped from Get-ChildItem" {
194
194
$piped = ( Get-ChildItem - Path $directory - Filter TestTestPath* .ps1 | Invoke-ScriptAnalyzer )
195
195
$explicit = Invoke-ScriptAnalyzer - Path $directory \TestTestPath* .ps1
@@ -410,7 +410,7 @@ Describe "Test CustomizedRulePath" {
410
410
Pop-Location
411
411
}
412
412
}
413
-
413
+
414
414
It " resolves rule preset when passed in via pipeline" {
415
415
$warnings = ' CodeFormattingStroustrup' | ForEach-Object {
416
416
Invoke-ScriptAnalyzer - ScriptDefinition ' if ($true){}' - Settings $_ }
@@ -545,25 +545,25 @@ Describe "Test -EnableExit Switch" {
545
545
546
546
Describe " -ReportSummary switch" {
547
547
$reportSummaryFor1Warning = ' *1 rule violation found. Severity distribution: Error = 0, Warning = 1, Information = 0*'
548
- It " prints the correct report summary using the -NoReportSummary switch" {
548
+ It " prints the correct report summary using the -NoReportSummary switch" - Skip:( $ env: APPVEYOR -and $IsLinux ) {
549
549
if ($IsCoreCLR ) {
550
550
$result = pwsh - command ' Import-Module PSScriptAnalyzer; Invoke-Scriptanalyzer -ScriptDefinition gci -ReportSummary'
551
551
}
552
552
else {
553
553
$result = powershell - command ' Invoke-Scriptanalyzer -ScriptDefinition gci -ReportSummary'
554
554
}
555
-
556
- " $result " | Should - BeLike $reportSummaryFor1Warning
555
+
556
+ " $result " | Should - BeLike $reportSummaryFor1Warning
557
557
}
558
- It " does not print the report summary when not using -NoReportSummary switch" {
558
+ It " does not print the report summary when not using -NoReportSummary switch" - Skip:( $ env: APPVEYOR -and $IsLinux ) {
559
559
if ($IsCoreCLR ) {
560
560
$result = pwsh - command ' Import-Module PSScriptAnalyzer; Invoke-Scriptanalyzer -ScriptDefinition gci'
561
561
}
562
562
else {
563
563
$result = powershell - command ' Invoke-Scriptanalyzer -ScriptDefinition gci'
564
564
}
565
-
566
- " $result " | Should -Not - BeLike $reportSummaryFor1Warning
565
+
566
+ " $result " | Should -Not - BeLike $reportSummaryFor1Warning
567
567
}
568
568
}
569
569
0 commit comments