Skip to content

fix: add meta/manifest tests, fix tab indentation, and correct changelog version#188

Merged
HeyItsGilbert merged 5 commits into
mainfrom
fix/meta-tests-and-changelog
Jun 12, 2026
Merged

fix: add meta/manifest tests, fix tab indentation, and correct changelog version#188
HeyItsGilbert merged 5 commits into
mainfrom
fix/meta-tests-and-changelog

Conversation

@HeyItsGilbert

Copy link
Copy Markdown
Member

Summary

  • Add Manifest.tests.ps1, Meta.Tests.ps1, and MetaFixers.psm1 — new test infrastructure that validates manifest/changelog version parity and enforces space indentation across all text files
  • Rename [0.4.0-alpha][0.4.0] in CHANGELOG.md so the manifest test's version regex matches the manifest version
  • Convert tabs → spaces in PSGalleryModule.ps1, Get-Dependency.ps1, and five credential test depend files to satisfy the meta indentation test

Test plan

  • .\build.ps1 StageFiles completes cleanly
  • Manifest.tests.ps1 passes (changelog version matches manifest)
  • Meta.Tests.ps1 passes (0 files with tab indentation)
  • Full test suite: 383 passed, 0 failed

🤖 Generated with Claude Code

…log version

- Add Manifest.tests.ps1, Meta.Tests.ps1, and MetaFixers.psm1 to validate
  manifest/changelog version parity and enforce space indentation
- Convert tabs to spaces in PSGalleryModule.ps1, Get-Dependency.ps1, and
  five credential test depend files to satisfy the new meta test
- Rename [0.4.0-alpha] to [0.4.0] in CHANGELOG.md so the version regex
  matches the manifest version and the manifest test passes
- Update Help.tests.ps1 (collateral from the credential work)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 12, 2026 18:42
@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown

Test Results

    3 files     66 suites   1m 29s ⏱️
  951 tests   895 ✅ 56 💤 0 ❌
1 275 runs  1 209 ✅ 66 💤 0 ❌

Results for commit b7bc142.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds new “meta” and manifest validation tests to the PSDepend test suite, updates the changelog version header to align with the manifest version check, and normalizes indentation (tabs → spaces) in several scripts and test depend files.

Changes:

  • Add new Pester tests and helper module to validate manifest/changelog version parity and enforce text-file formatting rules.
  • Update CHANGELOG.md version header from 0.4.0-alpha to 0.4.0.
  • Replace tab indentation with spaces in selected scripts and credential-related depend files.

Reviewed changes

Copilot reviewed 5 out of 12 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
Tests/MetaFixers.psm1 Adds helper functions for listing text files and applying encoding/indentation fixers.
Tests/Meta.Tests.ps1 Introduces repo-wide checks for UTF-16/NUL bytes and tab indentation.
Tests/Manifest.tests.ps1 Adds a manifest validation suite and changelog-version parity test.
Tests/Help.tests.ps1 Updates test bootstrap/build behavior and refactors help-parameter validation.
Tests/DependFiles/savemodule.withcredentials.depend.psd1 Converts tabs to spaces in test depend data.
Tests/DependFiles/psgallerynuget.withcredentials.psd1 Converts tabs to spaces in test depend data.
Tests/DependFiles/psgallerynuget.latestversionwithcredential.depend.psd1 Converts tabs to spaces in test depend data.
Tests/DependFiles/psgallerymodule.withcredentials.depend.psd1 Converts tabs to spaces in test depend data.
Tests/DependFiles/psgallerymodule.multiplecredentials.depend.psd1 Converts tabs to spaces in test depend data.
PSDepend/Public/Get-Dependency.ps1 Adjusts comment-based help indentation and examples.
PSDepend/PSDependScripts/PSGalleryModule.ps1 Fixes tab indentation in comment header.
CHANGELOG.md Updates release header formatting/version label.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Tests/Help.tests.ps1
Comment on lines 112 to 114
It "finds help parameter in code: <_>" {
$_ -in $script:commandParameterNames | Should -Be $true
$_ -in $parameterNames | Should -Be $true
}
Comment thread Tests/Help.tests.ps1
$helpLinks = @($commandHelp.relatedLinks.navigationLink.uri | Where-Object { $_ })
$helpParameters = global:FilterOutCommonParams -Params $commandHelp.Parameters.Parameter
$helpParameterNames = $helpParameters.Name
# $helpLinks = $commandHelp.relatedLinks.navigationLink.uri
Comment thread Tests/Help.tests.ps1 Outdated
Comment thread Tests/Help.tests.ps1 Outdated
Comment thread Tests/Meta.Tests.ps1 Outdated
Comment thread Tests/Manifest.tests.ps1 Outdated
Comment thread Tests/Manifest.tests.ps1 Outdated
Comment thread Tests/Manifest.tests.ps1 Outdated
Comment thread PSDepend/Public/Get-Dependency.ps1
Comment thread Tests/MetaFixers.psm1
HeyItsGilbert and others added 4 commits June 12, 2026 11:55
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Gilbert Sanchez <me@gilbertsanchez.com>
…ngelog path line

- Use $commandParameterNames (not undefined $parameterNames) in the
  help-parameter-in-code assertion
- Populate $helpParameterNames in BeforeDiscovery so Context -ForEach
  actually iterates during discovery (was silently empty with BeforeAll)
- Remove duplicate $changelogPath assignment that used the wrong -Child alias

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fixes PSAvoidTrailingWhitespace violations on lines 28 and 83 (blank
lines inside comment-based help).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PSAvoidTrailingWhitespace (73):
  Strip trailing whitespace from all .ps1/.psm1 files under PSDepend/ and Tests/

PSPossibleIncorrectComparisonWithNull (4):
  Move $null to left-hand side in GitHub.ps1, Npm.ps1, Sort-WithCustomList.ps1

PSAvoidUsingCmdletAliases (1):
  Replace `select` with Select-Object in Invoke-PSDepend.ps1

PSUseOutputTypeCorrectly (27):
  Add [OutputType(...)] to Get-PSDependScript, Invoke-PSDepend, Sort-PSDependency,
  Test-Dotnet, Test-PlatformSupport, Validate-DependencyParameters,
  New-TestCredential, and Test-PSDependTypeSupportedHere

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@HeyItsGilbert HeyItsGilbert merged commit 477c6f9 into main Jun 12, 2026
7 checks passed
@HeyItsGilbert HeyItsGilbert deleted the fix/meta-tests-and-changelog branch June 12, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants