diff --git a/.github/workflows/Action-Test-Src-Default.yml b/.github/workflows/Action-Test-Src-Default.yml index 5d3301b2..286804f2 100644 --- a/.github/workflows/Action-Test-Src-Default.yml +++ b/.github/workflows/Action-Test-Src-Default.yml @@ -24,7 +24,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Action-Test uses: ./ diff --git a/.github/workflows/Action-Test-Src-WithManifest.yml b/.github/workflows/Action-Test-Src-WithManifest.yml index 53dc398a..a8e16df6 100644 --- a/.github/workflows/Action-Test-Src-WithManifest.yml +++ b/.github/workflows/Action-Test-Src-WithManifest.yml @@ -24,7 +24,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Action-Test uses: ./ diff --git a/.github/workflows/Action-Test-outputs.yml b/.github/workflows/Action-Test-outputs.yml index b47e5116..2e25ae13 100644 --- a/.github/workflows/Action-Test-outputs.yml +++ b/.github/workflows/Action-Test-outputs.yml @@ -24,7 +24,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Action-Test uses: ./ diff --git a/.github/workflows/Auto-Release.yml b/.github/workflows/Auto-Release.yml index 680da5c0..50a5a410 100644 --- a/.github/workflows/Auto-Release.yml +++ b/.github/workflows/Auto-Release.yml @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Auto-Release uses: PSModule/Auto-Release@v1 diff --git a/.github/workflows/Linter.yml b/.github/workflows/Linter.yml index 1f677cbd..94f34b02 100644 --- a/.github/workflows/Linter.yml +++ b/.github/workflows/Linter.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 diff --git a/scripts/tests/Module/PSModule/PSModule.Tests.ps1 b/scripts/tests/Module/PSModule/PSModule.Tests.ps1 index e208dff2..8bf00f5e 100644 --- a/scripts/tests/Module/PSModule/PSModule.Tests.ps1 +++ b/scripts/tests/Module/PSModule/PSModule.Tests.ps1 @@ -7,7 +7,7 @@ Justification = 'Log outputs to GitHub Actions logs.' )] [CmdLetBinding()] -Param( +param( [Parameter(Mandatory)] [string] $Path ) diff --git a/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 b/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 index 001ca7f7..ef2efcf3 100644 --- a/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 +++ b/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 @@ -14,8 +14,12 @@ 'PSAvoidUsingWriteHost', '', Justification = 'Logging to Github Actions.' )] +[Diagnostics.CodeAnalysis.SuppressMessageAttribute( + 'PSAvoidLongLines', '', + Justification = 'Consistent formatting of ternary operator usage' +)] [CmdLetBinding()] -Param( +param( # The path to the 'src' folder of the repo. [Parameter(Mandatory)] [string] $Path, @@ -40,8 +44,7 @@ BeforeAll { } Write-Host '::endgroup::' $privateFunctionsPath = Join-Path -Path $functionsPath -ChildPath 'private' - $privateFunctionFiles = (Test-Path -Path $privateFunctionsPath) ? - (Get-ChildItem -Path $privateFunctionsPath -File -Filter '*.ps1' -Recurse) : $null + $privateFunctionFiles = (Test-Path -Path $privateFunctionsPath) ? (Get-ChildItem -Path $privateFunctionsPath -File -Filter '*.ps1' -Recurse) : $null Write-Host "::group:: - Private [$($privateFunctionFiles.Count)]" $privateFunctionFiles | ForEach-Object { Write-Host " - $($_.FullName)" @@ -62,16 +65,14 @@ BeforeAll { } Write-Host '::endgroup::' $privateVariablesPath = Join-Path -Path $variablesPath -ChildPath 'private' - $privateVariableFiles = (Test-Path -Path $privateVariablesPath) ? - (Get-ChildItem -Path $privateVariablesPath -File -Filter '*.ps1' -Recurse) : $null + $privateVariableFiles = (Test-Path -Path $privateVariablesPath) ? (Get-ChildItem -Path $privateVariablesPath -File -Filter '*.ps1' -Recurse) : $null Write-Host "::group:: - Private [$($privateVariableFiles.Count)]" $privateVariableFiles | ForEach-Object { Write-Host " - $($_.FullName)" } Write-Host '::endgroup::' $publicVariablesPath = Join-Path -Path $variablesPath -ChildPath 'public' - $publicVariableFiles = (Test-Path -Path $publicVariablesPath) ? - (Get-ChildItem -Path $publicVariablesPath -File -Filter '*.ps1' -Recurse) : $null + $publicVariableFiles = (Test-Path -Path $publicVariablesPath) ? (Get-ChildItem -Path $publicVariablesPath -File -Filter '*.ps1' -Recurse) : $null Write-Host "::group:: - Public [$($publicVariableFiles.Count)]" $publicVariableFiles | ForEach-Object { Write-Host " - $($_.FullName)" @@ -85,16 +86,14 @@ BeforeAll { } Write-Host '::endgroup::' $privateClassPath = Join-Path -Path $classPath -ChildPath 'private' - $privateClassFiles = (Test-Path -Path $privateClassPath) ? - (Get-ChildItem -Path $privateClassPath -File -Filter '*.ps1' -Recurse) : $null + $privateClassFiles = (Test-Path -Path $privateClassPath) ? (Get-ChildItem -Path $privateClassPath -File -Filter '*.ps1' -Recurse) : $null Write-Host "::group:: - Private [$($privateClassFiles.Count)]" $privateClassFiles | ForEach-Object { Write-Host " - $($_.FullName)" } Write-Host '::endgroup::' $publicClassPath = Join-Path -Path $classPath -ChildPath 'public' - $publicClassFiles = (Test-Path -Path $publicClassPath) ? - (Get-ChildItem -Path $publicClassPath -File -Filter '*.ps1' -Recurse) : $null + $publicClassFiles = (Test-Path -Path $publicClassPath) ? (Get-ChildItem -Path $publicClassPath -File -Filter '*.ps1' -Recurse) : $null Write-Host "::group:: - Public [$($publicClassFiles.Count)]" $publicClassFiles | ForEach-Object { Write-Host " - $($_.FullName)" diff --git a/tests/outputTestRepo/tests/MyTests/PSModuleTest.Tests.ps1 b/tests/outputTestRepo/tests/MyTests/PSModuleTest.Tests.ps1 index 9bf1bb64..7a49dadb 100644 --- a/tests/outputTestRepo/tests/MyTests/PSModuleTest.Tests.ps1 +++ b/tests/outputTestRepo/tests/MyTests/PSModuleTest.Tests.ps1 @@ -1,5 +1,5 @@ [CmdletBinding()] -Param( +param( # Path to the module to test. [Parameter()] [string] $Path diff --git a/tests/srcTestRepo/tests/PSModuleTest.Tests.ps1 b/tests/srcTestRepo/tests/PSModuleTest.Tests.ps1 index 9bf1bb64..7a49dadb 100644 --- a/tests/srcTestRepo/tests/PSModuleTest.Tests.ps1 +++ b/tests/srcTestRepo/tests/PSModuleTest.Tests.ps1 @@ -1,5 +1,5 @@ [CmdletBinding()] -Param( +param( # Path to the module to test. [Parameter()] [string] $Path diff --git a/tests/srcWithManifestTestRepo/tests/MyTests/PSModuleTest.Tests.ps1 b/tests/srcWithManifestTestRepo/tests/MyTests/PSModuleTest.Tests.ps1 index 9bf1bb64..7a49dadb 100644 --- a/tests/srcWithManifestTestRepo/tests/MyTests/PSModuleTest.Tests.ps1 +++ b/tests/srcWithManifestTestRepo/tests/MyTests/PSModuleTest.Tests.ps1 @@ -1,5 +1,5 @@ [CmdletBinding()] -Param( +param( # Path to the module to test. [Parameter()] [string] $Path