Closed
Description
Steps to reproduce
$def = @'
function hello {
if ($true) {
Write-Host "hello"
}
if ($true) {
"hello" | Out-Host
}
}
'@
Invoke-Formatter -ScriptDefinition $def -Settings CodeFormattingOTBS
Expected behavior
This is the output when using 1.17.1
function hello {
if ($true) {
Write-Host "hello"
}
if ($true) {
"hello" | Out-Host
}
}
Actual behavior
This is the output when using 1.18.0
function hello {
if ($true) {
Write-Host "hello"
}
if ($true) {
"hello" | Out-Host
}
}
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 6.1.3
PSEdition Core
GitCommitId 6.1.3
OS Microsoft Windows 10.0.17763
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
> (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }
1.18.0
1.17.1