Skip to content

Commit d228990

Browse files
authored
Create powershell-lint.yml
1 parent 3bcd064 commit d228990

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
#
6+
# https://github.com/microsoft/action-psscriptanalyzer
7+
# For more information on PSScriptAnalyzer in general, see
8+
# https://github.com/PowerShell/PSScriptAnalyzer
9+
10+
name: PowerShell Lint
11+
12+
on:
13+
push:
14+
paths:
15+
- '**.ps1'
16+
pull_request:
17+
paths:
18+
- '**.ps1'
19+
20+
jobs:
21+
lint:
22+
runs-on: windows-latest
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v3
26+
27+
- name: Install PSScriptAnalyzer
28+
run: Install-Module -Name PSScriptAnalyzer -Force -Scope CurrentUser
29+
30+
- name: Run PSScriptAnalyzer
31+
run: Invoke-ScriptAnalyzer -Path . -Recurse
32+
shell: pwsh

0 commit comments

Comments
 (0)