Skip to content

Formatting breaks script #1521

@DarkLite1

Description

@DarkLite1

Steps to reproduce

Try to format the following code by pressing CTRL + ALT + F with the default PowerShell extension and the setting below enabled
image

image

Write-Host "Located library @ '$ADALPath'" -ForegroundColor Yellow

Expected behavior

No changes

Actual behavior

The code gets broken as the double quotes at the end are removed:
image

Write-Host "Located library @ '$ADALPath'-ForegroundColor Yellow

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.14393.3471
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.3471
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

> (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }
1.19.0
1.18.3
1.19.0

> PowerShell extension version:
v2020.6.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions