-
Notifications
You must be signed in to change notification settings - Fork 125
Closed as not planned
Closed as not planned
Copy link
Labels
good first issueGood for newcomersGood for newcomers
Description
Update: Issue Closed as Invalid
After deeper analysis of the module architecture, this issue is based on an incorrect premise.
Current Architecture
| Module | Exports |
|---|---|
| CIHelpers.psm1 | Set-CIOutput, Set-CIEnv, Write-CIStepSummary, Write-CIAnnotation, etc. |
| LintingHelpers.psm1 | Get-ChangedFilesFromGit, Get-FilesRecursive, Get-GitIgnorePatterns |
Why the Proposed Change Would Break Tests
The linting scripts (Invoke-PSScriptAnalyzer.ps1, Invoke-YamlLint.ps1) import both modules directly and call CI functions at script scope—not through LintingHelpers:
Import-Module LintingHelpers.psm1 -Force
Import-Module CIHelpers.psm1 -Force
Set-CIOutput -Name "count" -Value "0" # Direct call to CIHelpersAdding -ModuleName LintingHelpers to mocks of Set-CIOutput would cause:
- ❌ Mocks would NOT intercept direct script calls (only calls from within LintingHelpers)
- ❌ Tests would fail because real CI functions would execute
Conclusion
The current session-level mocking strategy is correct for this module architecture. No changes needed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers