Skip to content

Commit

Permalink
Update pscriptanalyzer.yaml to use Node20 instead of deprecatated Node16
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnybottles committed Nov 19, 2024
1 parent a231fea commit 56d8b10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/psscriptanalzyer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
push:
branches:
- main
- Development
- development
- "feature/144-implement-dual-validation-psscriptanalyzer-with-standardized-settings"
paths:
- "**.ps1"
Expand All @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install PSScriptAnalyzer
shell: pwsh
Expand All @@ -44,8 +44,10 @@ jobs:
}
}
# Output results
# Create results file if there are any issues
if ($results) {
$resultPath = Join-Path $env:GITHUB_WORKSPACE "psscriptanalyzer-results.txt"
$results | Format-Table -AutoSize | Out-File -FilePath $resultPath
$results | Format-Table -AutoSize
Write-Output "::error::PSScriptAnalyzer found $($results.Count) issues"
exit 1
Expand All @@ -55,7 +57,8 @@ jobs:
- name: Upload PSScriptAnalyzer Results
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: psscriptanalyzer-results
path: psscriptanalyzer-results.txt
if-no-files-found: warn
2 changes: 1 addition & 1 deletion Hawk/tests/general/Test-PreCommitHook.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# 3. Observe the PSScriptAnalyzer warnings/errors

#region Good Code Examples - These will pass PSScriptAnalyzer
# add comement to test
# add comment to test this
function Test-GoodFunction {
[CmdletBinding()]
param (
Expand Down

0 comments on commit 56d8b10

Please sign in to comment.