Skip to content

Commit c51a892

Browse files
Isolate issue 2205 failing regression
Co-authored-by: jessehouwing <4173387+jessehouwing@users.noreply.github.com>
1 parent 3326269 commit c51a892

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

‎Tests/Rules/AvoidUsingAlias.tests.ps1‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,6 @@ gci -Path C:\
5050
$noViolations.Count | Should -Be 0
5151
}
5252

53-
It "does not fail looking up commands on Linux" -Skip:(-not $IsLinux) {
54-
$settingsPath = Join-Path $PSScriptRoot 'Issue2205/PSScriptAnalyzerSettings.psd1'
55-
$repositoryRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
56-
57-
Invoke-ScriptAnalyzer -Path $repositoryRoot -Recurse -Settings $settingsPath -ErrorAction Stop | Out-Null
58-
}
59-
6053
It "should return no violation for assignment statement-like command in dsc configuration" -skip:($IsLinux -or $IsMacOS) {
6154
$target = @'
6255
Configuration MyDscConfiguration {

‎Tests/Rules/Issue2205.tests.ps1‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
4+
Describe 'Issue 2205' {
5+
It "reproduces the Linux recursive analysis failure" -Skip:(-not $IsLinux) {
6+
$settingsPath = Join-Path $PSScriptRoot 'Issue2205/PSScriptAnalyzerSettings.psd1'
7+
$repositoryRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
8+
9+
Invoke-ScriptAnalyzer -Path $repositoryRoot -Recurse -Settings $settingsPath -ErrorAction Stop | Out-Null
10+
}
11+
}

0 commit comments

Comments
 (0)