Skip to content

Commit

Permalink
Add analyzer rule suppression to quiet CodeFactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWTruher committed Apr 16, 2024
1 parent 518eaf5 commit 29ce422
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/tools/Modules/HelpersCommon/HelpersCommon.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ function Get-RandomFileName
$SCRIPT:TesthookType = [system.management.automation.internal.internaltesthooks]
function Test-TesthookIsSet
{
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingEmptyCatchBlock", '')] # , Justification = "an error message is not appropriate for this function")]
param (
[ValidateNotNullOrEmpty()]
[Parameter(Mandatory=$true)]
Expand Down Expand Up @@ -196,6 +197,7 @@ public class TestDynamic : DynamicObject
# Upload an artifact in VSTS
# On other systems will just log where the file was placed
function Send-VstsLogFile {
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingWriteHost', '', Justification = "needed for VSO")]
param (
[parameter(Mandatory,ParameterSetName='contents')]
[string[]]
Expand Down Expand Up @@ -322,6 +324,8 @@ function New-RandomHexString
$script:CanWriteToPsHome = $null
function Test-CanWriteToPsHome
{
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingEmptyCatchBlock', '', Justification = "an error message is not appropriate for this function")]
param ()
if ($null -ne $script:CanWriteToPsHome) {
return $script:CanWriteToPsHome
}
Expand Down

0 comments on commit 29ce422

Please sign in to comment.