From b3c1a4d50dcde09284832e6f9755f7a7bcf62f72 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 02:46:10 +0000 Subject: [PATCH 1/6] Bump actions/checkout from 4 to 5 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/Action-Test-Src-Default.yml | 2 +- .github/workflows/Action-Test-Src-WithManifest.yml | 2 +- .github/workflows/Action-Test-outputs.yml | 2 +- .github/workflows/Auto-Release.yml | 2 +- .github/workflows/Linter.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) 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 From 84873c79cb441e8cfabcb6738d16b62d52e93272 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 20 Aug 2025 08:53:37 +0200 Subject: [PATCH 2/6] Fix --- .github/workflows/Linter.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/Linter.yml b/.github/workflows/Linter.yml index 94f34b02..17cde08b 100644 --- a/.github/workflows/Linter.yml +++ b/.github/workflows/Linter.yml @@ -30,3 +30,4 @@ jobs: VALIDATE_JSON_PRETTIER: false VALIDATE_MARKDOWN_PRETTIER: false VALIDATE_YAML_PRETTIER: false + From 755bd744bdb6d5217b41e2f5af45c0be2eabce78 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 20 Aug 2025 08:53:45 +0200 Subject: [PATCH 3/6] fix --- .github/workflows/Linter.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/Linter.yml b/.github/workflows/Linter.yml index 17cde08b..94f34b02 100644 --- a/.github/workflows/Linter.yml +++ b/.github/workflows/Linter.yml @@ -30,4 +30,3 @@ jobs: VALIDATE_JSON_PRETTIER: false VALIDATE_MARKDOWN_PRETTIER: false VALIDATE_YAML_PRETTIER: false - From e56de11eb5a051356f4920a2452afe43b1aebf5a Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 20 Aug 2025 08:59:30 +0200 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Standardize=20par?= =?UTF-8?q?ameter=20declaration=20to=20lowercase=20'param'=20in=20test=20s?= =?UTF-8?q?cripts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/tests/Module/PSModule/PSModule.Tests.ps1 | 2 +- scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 | 12 ++++++------ .../tests/MyTests/PSModuleTest.Tests.ps1 | 2 +- tests/srcTestRepo/tests/PSModuleTest.Tests.ps1 | 2 +- .../tests/MyTests/PSModuleTest.Tests.ps1 | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) 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..d7307a06 100644 --- a/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 +++ b/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 @@ -15,7 +15,7 @@ Justification = 'Logging to Github Actions.' )] [CmdLetBinding()] -Param( +param( # The path to the 'src' folder of the repo. [Parameter(Mandatory)] [string] $Path, @@ -41,7 +41,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 + (Get-ChildItem -Path $privateFunctionsPath -File -Filter '*.ps1' -Recurse) : $null Write-Host "::group:: - Private [$($privateFunctionFiles.Count)]" $privateFunctionFiles | ForEach-Object { Write-Host " - $($_.FullName)" @@ -63,7 +63,7 @@ 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 + (Get-ChildItem -Path $privateVariablesPath -File -Filter '*.ps1' -Recurse) : $null Write-Host "::group:: - Private [$($privateVariableFiles.Count)]" $privateVariableFiles | ForEach-Object { Write-Host " - $($_.FullName)" @@ -71,7 +71,7 @@ BeforeAll { Write-Host '::endgroup::' $publicVariablesPath = Join-Path -Path $variablesPath -ChildPath 'public' $publicVariableFiles = (Test-Path -Path $publicVariablesPath) ? - (Get-ChildItem -Path $publicVariablesPath -File -Filter '*.ps1' -Recurse) : $null + (Get-ChildItem -Path $publicVariablesPath -File -Filter '*.ps1' -Recurse) : $null Write-Host "::group:: - Public [$($publicVariableFiles.Count)]" $publicVariableFiles | ForEach-Object { Write-Host " - $($_.FullName)" @@ -86,7 +86,7 @@ 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 + (Get-ChildItem -Path $privateClassPath -File -Filter '*.ps1' -Recurse) : $null Write-Host "::group:: - Private [$($privateClassFiles.Count)]" $privateClassFiles | ForEach-Object { Write-Host " - $($_.FullName)" @@ -94,7 +94,7 @@ BeforeAll { Write-Host '::endgroup::' $publicClassPath = Join-Path -Path $classPath -ChildPath 'public' $publicClassFiles = (Test-Path -Path $publicClassPath) ? - (Get-ChildItem -Path $publicClassPath -File -Filter '*.ps1' -Recurse) : $null + (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 From dcead30298d2331c44ec55b0c6a7770a21fd27c2 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 20 Aug 2025 09:05:38 +0200 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Add=20suppression?= =?UTF-8?q?=20for=20long=20lines=20and=20improve=20formatting=20consistenc?= =?UTF-8?q?y=20in=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SourceCode/PSModule/PSModule.Tests.ps1 | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 b/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 index d7307a06..59d80d08 100644 --- a/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 +++ b/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 @@ -14,6 +14,10 @@ 'PSAvoidUsingWriteHost', '', Justification = 'Logging to Github Actions.' )] +[Diagnostics.CodeAnalysis.SuppressMessageAttribute( + 'PSAvoidLongLines', '', + Justification = 'Consistent formatting of ternary operator usage' +)] [CmdLetBinding()] param( # The path to the 'src' folder of the repo. @@ -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,18 @@ 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 = if (Test-Path -Path $publicClassPath) { + (Get-ChildItem -Path $publicClassPath -File -Filter '*.ps1' -Recurse) + } else { + $null + } Write-Host "::group:: - Public [$($publicClassFiles.Count)]" $publicClassFiles | ForEach-Object { Write-Host " - $($_.FullName)" From 06e25585ce8fdad17d1528fbc16da36ddc086090 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 20 Aug 2025 09:23:31 +0200 Subject: [PATCH 6/6] Refactor public class file retrieval to use ternary operator for consistency --- scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 b/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 index 59d80d08..ef2efcf3 100644 --- a/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 +++ b/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 @@ -93,11 +93,7 @@ BeforeAll { } Write-Host '::endgroup::' $publicClassPath = Join-Path -Path $classPath -ChildPath 'public' - $publicClassFiles = if (Test-Path -Path $publicClassPath) { - (Get-ChildItem -Path $publicClassPath -File -Filter '*.ps1' -Recurse) - } else { - $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)"