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.
This commit is contained in:
Howard Wolosky 2020-10-07 14:22:16 -07:00
Родитель ab536c772a
Коммит c06614903e
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -146,6 +146,7 @@ function Build-SideBar
.EXAMPLE
Build-SideBar -Path ./docs -ModuleRootPageFileName 'root.md' -ModuleName 'PowerShellForGitHub' -ModulePages @('Foo', 'Bar')
#>
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseApprovedVerbs", "", Justification="It's an approved verb in PS Core, just not Windows PowerShell. Plus, this is an internal helper.")]
[CmdletBinding()]
param(
[Parameter(Mandatory)]
@ -226,6 +227,7 @@ function Build-Footer
.EXAMPLE
Build-Footer -Path ./docs -ModuleRootPageFileName 'root.md' -ModuleName 'PowerShellForGitHub'
#>
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseApprovedVerbs", "", Justification="It's an approved verb in PS Core, just not Windows PowerShell. Plus, this is an internal helper.")]
[CmdletBinding()]
param(
[Parameter(Mandatory)]
@ -290,6 +292,7 @@ function Build-HomePage
.EXAMPLE
Build-HomePage -Path ./docs -ModuleRootPageFileName 'root.md'
#>
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseApprovedVerbs", "", Justification="It's an approved verb in PS Core, just not Windows PowerShell. Plus, this is an internal helper.")]
[CmdletBinding()]
param(
[Parameter(Mandatory)]