We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4dc7ab7 commit bca9c66Copy full SHA for bca9c66
1 file changed
.github/workflows/powershell-lint.yml
@@ -0,0 +1,34 @@
1
+name: PowerShell lint
2
+
3
+on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
8
9
+permissions:
10
+ contents: read
11
12
+jobs:
13
+ psscriptanalyzer:
14
+ name: PSScriptAnalyzer
15
+ runs-on: windows-latest
16
17
+ steps:
18
+ - name: Checkout
19
+ uses: actions/checkout@v6
20
21
+ - name: Install PSScriptAnalyzer
22
+ shell: pwsh
23
+ run: |
24
+ Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
25
+ Install-Module -Name PSScriptAnalyzer -Scope CurrentUser -Force
26
27
+ - name: Run analyzer
28
29
30
+ $results = Invoke-ScriptAnalyzer -Path . -Recurse -Severity Error,Warning
31
+ $results | Format-Table -AutoSize
32
+ if ($results) {
33
+ throw "PSScriptAnalyzer found issues."
34
+ }
0 commit comments