mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
[release/v7.4] Suppress false positive PSScriptAnalyzer warnings in tests and build scripts (#26058)
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
|
||||
param()
|
||||
|
||||
Describe "Serialization Tests" -tags "CI" {
|
||||
BeforeAll {
|
||||
$testfileName="SerializationTest.txt"
|
||||
@@ -99,4 +103,3 @@ Describe "Serialization Tests" -tags "CI" {
|
||||
SerializeAndDeserialize($versionObject).TestScriptProperty | Should -Be $versionObject.TestScriptProperty
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
# PSSession tests for non-Windows platforms
|
||||
#
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
|
||||
param()
|
||||
|
||||
function GetRandomString()
|
||||
{
|
||||
return [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName())
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
|
||||
param()
|
||||
|
||||
Import-Module HelpersCommon
|
||||
|
||||
function GetRandomString()
|
||||
|
||||
Reference in New Issue
Block a user