File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -323,15 +323,16 @@ jobs:
323323 Write-Host "Running PSScriptAnalyzer..." -ForegroundColor Cyan
324324
325325 # Find all .ps1 and .psm1 files in Functions directory
326- $scriptFiles = Get-ChildItem -Path "${{ github.workspace }}/current-module/Functions" -Filter "*.ps1" -Recurse -ErrorAction SilentlyContinue
327- $moduleFiles = Get-ChildItem -Path "${{ github.workspace }}/current-module" -Filter "*.psm1" -Recurse -ErrorAction SilentlyContinue
326+ $scriptFiles = Get-ChildItem -LiteralPath "${{ github.workspace }}/current-module/Functions" -Filter "*.ps1" -Recurse -ErrorAction SilentlyContinue
327+ $moduleFiles = Get-ChildItem -LiteralPath "${{ github.workspace }}/current-module" -Filter "*.psm1" -Recurse -ErrorAction SilentlyContinue
328328
329329 $allFiles = @($scriptFiles) + @($moduleFiles)
330330 $issuesFound = $false
331331
332332 foreach ($file in $allFiles) {
333333 Write-Host "`nAnalyzing: $($file.FullName)" -ForegroundColor Yellow
334- $results = Invoke-ScriptAnalyzer -Path $file.FullName -Settings $settingsHashtable if ($results) {
334+ $results = Invoke-ScriptAnalyzer -Path ($file.FullName) -Settings $settingsHashtable
335+ if ($results) {
335336 $issuesFound = $true
336337 $results | Format-Table -AutoSize -Property Severity, Line, RuleName, Message
337338 }
You can’t perform that action at this time.
0 commit comments