Skip to content

Commit 2b77ba0

Browse files
🚀 [Feature]: Update Invoke-ScriptAnalyzer to output empty string for SettingsFilePath and enhance logging in tests
1 parent 3cba608 commit 2b77ba0

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

‎scripts/main.ps1‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,4 @@ if ($null -eq $settingsFilePath) {
2626

2727
Set-GitHubOutput -Name CodePath -Value $codePath
2828
Set-GitHubOutput -Name TestPath -Value $testPath
29-
# Output empty string instead of null to avoid GitHub Actions converting null to the string "null"
3029
Set-GitHubOutput -Name SettingsFilePath -Value ($null -eq $settingsFilePath ? '' : $settingsFilePath)

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,14 @@ Describe 'PSScriptAnalyzer' {
104104
$invokeParams = @{
105105
Path = $Path
106106
Recurse = $true
107-
Verbose = $true
108107
}
109108

110109
if ($hasSettingsFile) {
111110
$invokeParams['Settings'] = $SettingsFilePath
112111
}
113112

114113
$logMessage = if ($hasSettingsFile) {
115-
"Invoke-ScriptAnalyzer -Path [$relativePath] -Settings [$relativeSettingsFilePath]"
114+
"Invoke-ScriptAnalyzer -Path [$relativePath] -Recurse -Settings [$relativeSettingsFilePath]"
116115
} else {
117116
"Invoke-ScriptAnalyzer -Path [$relativePath] -Recurse (using default settings)"
118117
}

0 commit comments

Comments
 (0)