Suppress bogus analyzer warnings.

This commit is contained in:
jhoneill
2020-11-23 09:34:14 +00:00
parent 0d29fd813d
commit 9dafe170f1
3 changed files with 11 additions and 2 deletions

View File

@@ -1,4 +1,8 @@
Describe ExportExcel -Tag "ExportExcel" {
#Requires -Modules Pester
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments','',Justification='False Positives')]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidAssignmentToAutomaticVariable','',Justification='Only executes on versions without the automatic variable')]
param()
Describe ExportExcel -Tag "ExportExcel" {
BeforeAll {
if ($null -eq $IsWindows) { $IsWindows = [environment]::OSVersion.Platform -like "win*" }
$WarningAction = "SilentlyContinue"

View File

@@ -1,4 +1,7 @@
Describe "Join Worksheet part 1" {
#Requires -Modules Pester
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments','',Justification='False Positives')]
param()
Describe "Join Worksheet part 1" {
BeforeAll {
$data1 = ConvertFrom-Csv -InputObject @"
ID,Product,Quantity,Price,Total

View File

@@ -1,3 +1,5 @@
#Requires -Modules Pester
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments','',Justification='False Positives')]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingCmdletAliases','',Justification='Testing for presence of alias')]
param()