Skip to content

Commit c066149

Browse files
committed
Fix static-analyzer warning for Windows PowerShell
The Build-* verb is new to PowerShell Core and so was considered unapproved for Windows PowerShell. Given that these are internal helper methods and it _is_ an approved verb in PS Core, keeping as-is and just marking these warning instances to be suppressed.
1 parent ab536c7 commit c066149

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

build/scripts/Build-Wiki.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ function Build-SideBar
146146
.EXAMPLE
147147
Build-SideBar -Path ./docs -ModuleRootPageFileName 'root.md' -ModuleName 'PowerShellForGitHub' -ModulePages @('Foo', 'Bar')
148148
#>
149+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseApprovedVerbs", "", Justification="It's an approved verb in PS Core, just not Windows PowerShell. Plus, this is an internal helper.")]
149150
[CmdletBinding()]
150151
param(
151152
[Parameter(Mandatory)]
@@ -226,6 +227,7 @@ function Build-Footer
226227
.EXAMPLE
227228
Build-Footer -Path ./docs -ModuleRootPageFileName 'root.md' -ModuleName 'PowerShellForGitHub'
228229
#>
230+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseApprovedVerbs", "", Justification="It's an approved verb in PS Core, just not Windows PowerShell. Plus, this is an internal helper.")]
229231
[CmdletBinding()]
230232
param(
231233
[Parameter(Mandatory)]
@@ -290,6 +292,7 @@ function Build-HomePage
290292
.EXAMPLE
291293
Build-HomePage -Path ./docs -ModuleRootPageFileName 'root.md'
292294
#>
295+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseApprovedVerbs", "", Justification="It's an approved verb in PS Core, just not Windows PowerShell. Plus, this is an internal helper.")]
293296
[CmdletBinding()]
294297
param(
295298
[Parameter(Mandatory)]

0 commit comments

Comments
 (0)