Skip to content

Commit

Permalink
Fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju committed Mar 5, 2023
1 parent 1444a34 commit f677cad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ jobs:
Write-Information -MessageData 'Running PSScriptAnalyzer.' -InformationAction 'Continue'
$filesToScan |
Invoke-ScriptAnalyzer -Settings './.vscode/analyzersettings.psd1' |
Invoke-ScriptAnalyzer -Settings './.vscode/analyzersettings.psd1' -ExcludeRule @(
'TypeNotFound' # Because classes in the project cannot be found unless built.
'RequiresModuleInvalid' # Because 'using module' in prefix.ps1 cannot be resolved as source file.
) |
ConvertTo-SARIF -FilePath 'results.sarif'
Write-Information -MessageData 'Analyzing done.' -InformationAction 'Continue'
Expand Down
4 changes: 2 additions & 2 deletions .vscode/analyzersettings.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@

# TODO: This is not excluded correctly, see test QA/ScriptAnalyzer.Tests.ps1 for more information.
ExcludeRules = @(
'TypeNotFound'
'RequiresModuleInvalid' # Becuase 'using module' in prefix.ps1 cannot be resolved as source file.
'TypeNotFound' # Because classes in the project cannot be found unless built.
'RequiresModuleInvalid' # Because 'using module' in prefix.ps1 cannot be resolved as source file.
)

Rules = @{
Expand Down

0 comments on commit f677cad

Please sign in to comment.