Skip to content

Commit dd08ad8

Browse files
🩹 [Patch]: Update logging in PSScriptAnalyzer tests to include full settings file path
1 parent ae2041c commit dd08ad8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,13 @@ BeforeDiscovery {
6060
}
6161
)
6262
}
63-
Write-Warning "Discovered [$($rules.Count)] rules"
64-
$relativeSettingsFilePath = $SettingsFilePath.Replace($PSScriptRoot, '').Trim('\').Trim('/')
6563
}
6664
}
6765

6866
Describe "PSScriptAnalyzer" {
6967
BeforeAll {
70-
LogGroup "Invoke-ScriptAnalyzer -Path [$Path] -Settings [$relativeSettingsFilePath]" {
68+
$relativeSettingsFilePath = $SettingsFilePath.Replace($PSScriptRoot, '').Trim('\').Trim('/')
69+
LogGroup "Invoke-ScriptAnalyzer -Path [$Path] -Settings [$SettingsFilePath]" {
7170
$testResults = Invoke-ScriptAnalyzer -Path $Path -Settings $SettingsFilePath -Recurse -Verbose
7271
Write-Warning "Found [$($testResults.Count)] issues"
7372
}

0 commit comments

Comments
 (0)