From b88763c029bfdb0a4791a0863e4381273a1c35b2 Mon Sep 17 00:00:00 2001 From: Trent Blackburn Date: Sun, 3 May 2026 23:17:33 -0400 Subject: [PATCH] refactor(build): drop $_ prefix from helper variable names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename $_moduleVersion → $moduleVersion and $_stagedOutput → $stagedOutput in build.psake.ps1's properties block. Pure rename, no behavior change. The $_ prefix was meant to signal "internal helper, not configuration" but is easy to misread as the $_ automatic pipeline variable. The shorter names are clearer in context (assignment targets in a properties{} block, not script-block parameters). Same rename applied across the user's downstream modules (JsmOperations, PlexAutomationToolkit, ReScenePS) so the template and all initialized modules stay in sync. Co-Authored-By: Claude Opus 4.7 (1M context) --- build.psake.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.psake.ps1 b/build.psake.ps1 index b575ff7..cad18bc 100644 --- a/build.psake.ps1 +++ b/build.psake.ps1 @@ -22,11 +22,11 @@ properties { if (-not $Env:BHPSModuleManifest -or -not $Env:BHProjectName) { throw 'Coverage configuration requires BuildHelpers env vars. Run via ./build.ps1 or call Set-BuildEnvironment first.' } - $_moduleVersion = (Import-PowerShellDataFile -Path $Env:BHPSModuleManifest).ModuleVersion - $_stagedOutput = [IO.Path]::Combine($PSScriptRoot, 'Output', $Env:BHProjectName, $_moduleVersion) + $moduleVersion = (Import-PowerShellDataFile -Path $Env:BHPSModuleManifest).ModuleVersion + $stagedOutput = [IO.Path]::Combine($PSScriptRoot, 'Output', $Env:BHProjectName, $moduleVersion) $PSBPreference.Test.CodeCoverage.Files = @( - "$_stagedOutput/Public/*.ps1" - "$_stagedOutput/Private/*.ps1" + "$stagedOutput/Public/*.ps1" + "$stagedOutput/Private/*.ps1" ) $PSBPreference.Test.CodeCoverage.Threshold = 0 # Threshold enforced by Codecov $PSBPreference.Test.CodeCoverage.OutputFile = [IO.Path]::Combine($PSScriptRoot, 'out', 'codeCoverage.xml')