You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is like issue #1536 but I created a new one because I have extra details and test cases that change code when operators are not involved.
Steps to reproduce
This only breaks using the setting "powershell.codeFormatting.whitespaceBetweenParameters": true, is enabled
You can create a fresh powershell file with only the following:
The new test case contains \" which is not a PowerShell escape sequence, but maybe passing between the language server/addon it's not properly being escaped somewhere?
whitespaceBetweenParameters is modifying strings directly, not the spacing between parameters
running Format Document repeatedly results in more errors. The above example will modify the script every format up to the first 3 times.
operators are not required
Environment data
>$PSVersionTable
Name Value
---------
PSVersion 7.0.2
PSEdition Core
GitCommitId 7.0.2
OS Microsoft Windows 10.0.18363
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.19.0
Thanks @ninmonkey for providing such detailed information and repro steps... this information will be helpful as we continue to investigate this issue, for our own tracking purposes I will link this to issue #1536 (as you mention) and mark as a duplicate
This is like issue #1536 but I created a new one because I have extra details and test cases that change code when operators are not involved.
Steps to reproduce
This only breaks using the setting
"powershell.codeFormatting.whitespaceBetweenParameters": true,
is enabledYou can create a fresh powershell file with only the following:
Then run
Format Document
Running multiple times continues making non-formating changes to the code.Expected behavior
Actual behavior
formatting 1 time
formatting 3 times
end of attached log
interesting behavior
\"
which is not a PowerShell escape sequence, but maybe passing between the language server/addon it's not properly being escaped somewhere?whitespaceBetweenParameters
is modifying strings directly, not the spacing between parametersFormat Document
repeatedly results in more errors. The above example will modify the script every format up to the first 3 times.operators
are not requiredEnvironment data
VS Code settings.json
Visual Studio Code Extensions
Note: These are installed addons, they are not all enabled
ms-vscode.powershell-preview
is enabledms-vscode.powershell
is disabledVisual Studio Code Extensions(Click to Expand)
logs and sample files.zip
The text was updated successfully, but these errors were encountered: