Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting breaks script #1521

Closed
DarkLite1 opened this issue Jun 12, 2020 · 1 comment
Closed

Formatting breaks script #1521

DarkLite1 opened this issue Jun 12, 2020 · 1 comment

Comments

@DarkLite1
Copy link

DarkLite1 commented Jun 12, 2020

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
@ghost ghost added the Needs: Triage 🔍 label Jun 12, 2020
@bergmeister
Copy link
Collaborator

bergmeister commented Jun 13, 2020

Thanks for taking the time to report it. I can verify this happens with 1.19.0 but I am happy to say we have fixed this in master already by PR #1495
We will briefly discuss this issue at the next triage session since there are also other recently fixed cases that would warrant releasing some of the recent fixes in a new patch release, therefore expect this issue to get closed soon but you'll have to wait for the next release in the meantime and I suggest to turn that new setting off in the meantime.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants