Skip to content

eating operators on save when "powershell.codeFormatting.whitespaceAroundOperator": true #1594

Closed
@lev741

Description

@lev741

System Details

System Details Output

### VSCode version: 1.50.1 d2e414d9e4239a252d1ab117bd7067f125afd80a x64

### VSCode extensions:
ms-vscode.powershell@2020.6.0


### PSES version: 2.2.0.0

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      7.0.3
PSEdition                      Core
GitCommitId                    7.0.3
OS                             Linux 5.8.14-200.fc32.x86_64 PowerShell/vscode-powershell#1 SMP Wed Oct 7 14:47:56 UTC 2020
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Issue Description

I am experiencing a problem with formating.
When
"powershell.codeFormatting.whitespaceAroundOperator": true,
"editor.formatOnSave": true,
then on save editor "eating" operators. You can test it on attached file when save twice.
Same behaviour on Windows.
I reported this here: microsoft/vscode#108070 but it seems to be extension problem.
test.zip

Expected Behaviour

-- Description of what should be happening --

Actual Behaviour

-- Description of what actually happens --

Attached Logs

Follow the instructions in the troubleshooting docs
about capturing and sending logs.

Activity

SydneyhSmith

SydneyhSmith commented on Oct 21, 2020

@SydneyhSmith
Collaborator

Thanks @lev1415 looks like this is a duplicate of #1561

ghost

ghost commented on Oct 22, 2020

@ghost

This issue has been marked as duplicate and has not had any activity for 1 day. It will be closed for housekeeping purposes.

ghost closed this as completedon Oct 22, 2020
bergmeister

bergmeister commented on Oct 22, 2020

@bergmeister
Collaborator

@lev1415 This bug was fixed in PSSA 1.19.1 but the stable PowerShell extension is not shipping that yet (not sure why). If you use the preview extension and restart vs-code then this should not happen any more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @bergmeister@SydneyhSmith@lev741

        Issue actions

          eating operators on save when "powershell.codeFormatting.whitespaceAroundOperator": true · Issue #1594 · PowerShell/PSScriptAnalyzer