Skip to content

Comments

Improvement that comes from ProjectHelper work#51

Merged
rulasg merged 14 commits intomainfrom
Improvement-from-projecthelper
Feb 2, 2026
Merged

Improvement that comes from ProjectHelper work#51
rulasg merged 14 commits intomainfrom
Improvement-from-projecthelper

Conversation

@rulasg
Copy link
Owner

@rulasg rulasg commented Feb 2, 2026

Documentation and Developer Guidance

  • Major rewrite and expansion of .github/copilot-instructions.md, now tailored for ProjectHelper, with detailed explanations of architecture, development patterns, testing conventions, and key gotchas for contributors.

Testing and Mocking Infrastructure

  • Introduced Test/include/InvokeMockList.ps1, providing functions to trace and log mock command invocations and their associated files, enhancing test traceability.
  • Updated Test/include/invokeCommand.mock.ps1 to use the new tracing functions, improved environment variable naming, and enabled better tracking and exporting of mock command aliases and their usage in tests. [1] [2] [3] [4] [5] [6] [7]
  • Enhanced test coverage and expectations in Test/public/listIncludes.test.ps1 and Test/public/invokeCommand.mock.test.ps1 to align with new mocking and tracing mechanisms. [1] [2]

CI/CD Workflow Improvements

  • Updated .github/workflows/deploy_module_on_release.yml and .github/workflows/test_with_TestingHelper.yml to:
    • Import and use a custom Test_Helper module for advanced test result validation.
    • Enforce that all tests must pass before deployment, with clear output and exit codes.
    • Ensure required modules are installed and imported before deployment. [1] [2] [3] [4]

Development Environment

  • Removed the PowerShell profile customization from .vscode/settings.json to simplify terminal configuration.

These changes collectively improve developer onboarding, test reliability, and deployment safety for the module.Add plenty of features that come from ProjectHelper work

param(
[Parameter(Position = 0)][string]$section
[Parameter(Position = 0)][string]$section,
[Parameter()][switch]$Logging

Check warning

Code scanning / PSScriptAnalyzer

The parameter 'Logging' has been declared but not used. Warning

The parameter 'Logging' has been declared but not used.
$manifest = $Path | Join-Path -child "*.psd1" | Get-Item | Import-PowerShellDataFile
$requiredModule = $null -eq $manifest.RequiredModules ? @() : $manifest.RequiredModules

"Found RequiredModules: $($requiredModule.Count)" | Write-Host -ForegroundColor DarkGray

Check warning

Code scanning / PSScriptAnalyzer

File 'Get-RequiredModule.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning

File 'Get-RequiredModule.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information.

# Convert to hashtable
$requiredModule | ForEach-Object{
"Processing RequiredModule: $($_| convertto-json -Depth 5)" | Write-Host -ForegroundColor DarkGray

Check warning

Code scanning / PSScriptAnalyzer

File 'Get-RequiredModule.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning

File 'Get-RequiredModule.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information.
. SYNOPSIS
Extracts the required modules from the module manifest
#>
function Get-RequiredModule{

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'Get-RequiredModule' does not have a help comment. Note

The cmdlet 'Get-RequiredModule' does not have a help comment.
@@ -0,0 +1,28 @@
function Test-Result{

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'Test-Result' does not have a help comment. Note test

The cmdlet 'Test-Result' does not have a help comment.
@@ -0,0 +1,37 @@
function Set-TestName{

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'Set-TestName' does not have a help comment. Note test

The cmdlet 'Set-TestName' does not have a help comment.
}
} Export-ModuleMember -Function Set-TestName -Alias st

function Get-TestName{

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'Get-TestName' does not have a help comment. Note test

The cmdlet 'Get-TestName' does not have a help comment.
}
} Export-ModuleMember -Function Get-TestName -Alias gt

function Clear-TestName{

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'Clear-TestName' does not have a help comment. Note test

The cmdlet 'Clear-TestName' does not have a help comment.
@rulasg rulasg force-pushed the Improvement-from-projecthelper branch from a709d57 to e70aeba Compare February 2, 2026 11:13
@rulasg rulasg merged commit 4bdf3bb into main Feb 2, 2026
3 checks passed
@rulasg rulasg deleted the Improvement-from-projecthelper branch February 2, 2026 11:34
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.

1 participant