Skip to content

Add main script: Optimize-Windows.ps1 #2

Add main script: Optimize-Windows.ps1

Add main script: Optimize-Windows.ps1 #2

name: PowerShell Lint
on:
push:
branches: [ main ]
paths:
- 'scripts/**'
- '.github/workflows/**'
pull_request:
branches: [ main ]
paths:
- 'scripts/**'
jobs:
pssa:
name: PSScriptAnalyzer
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install PSScriptAnalyzer
shell: pwsh
run: Install-Module -Name PSScriptAnalyzer -Force -Scope CurrentUser
- name: Run PSScriptAnalyzer
shell: pwsh
run: |
$results = Invoke-ScriptAnalyzer -Path scripts/Optimize-Windows.ps1 -Severity Error,Warning
if ($results) {
$results | Format-Table -AutoSize
exit 1
}