-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running PSScriptAnalyzer as local action. #1388
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
… into PSScriptAnalyzerAction
@microsoft-github-policy-service agree company="Microsoft" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great first addition! Left some comments, but otherwise, let's merge it!
|
||
$htPSA = [ordered]@{ Path = $Path } | ||
Write-Output "Modules installed, now running tests." | ||
if (![string]::IsNullOrEmpty($ExcludeRule)) { $htPSA.add('ExcludeRule', $ExcludeRule) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (![string]::IsNullOrEmpty($ExcludeRule)) { $htPSA.add('ExcludeRule', $ExcludeRule) } | |
if ($ExcludeRule) { $htPSA.add('ExcludeRule', $ExcludeRule) } |
We are currently running PSScriptAnalyzer via the action in this repo: https://github.com/microsoft/psscriptanalyzer-action, however this has more settings and options than we need.
I recreated the action locally, and simplified it to fit our needs.