Skip to content

Conversation

@rulasg
Copy link
Owner

@rulasg rulasg commented Jun 27, 2025

No description provided.

}
# Act
$result = Invoke-MyCommand -Command $command -Parameters $param

Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace
Assert-AreNotEqual -Expected $str -Presented $result

# Correct call with parameter formatting

Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace
# if a string contains double quotes, it will fail as it will confuse the string content with parameter values
# so we need to escape the double quotes in the string to ensure the quotes that are part of the string value and not parameter boundaries

function ConvertTo-InvokeParameterString {

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'ConvertTo-InvokeParameterString' does not have a help comment. Note

The cmdlet 'ConvertTo-InvokeParameterString' does not have a help comment.
if ([string]::IsNullOrEmpty($InputString)) {
return $InputString
}

Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace
@rulasg rulasg merged commit 0df02b7 into main Jun 27, 2025
3 checks passed
@rulasg rulasg deleted the Format-InvokeParameterString branch June 27, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants