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
i've got a new problem with powershell formatting.
i upgraded to [email protected] an hour or two before i noticed this problem.
it may have existed prior to the upgrade, but i never noticed it.
it's particularly scary because i didn't notice it for some time until my code started failing.
the attached zip has all the files described below plus a debug log.
the before .ps1 code is in hashtable-formatting_BEFORE.ps1
i tried to reproduce the problem in unaffected-hashtables.ps1 but the code here formatted correctly.
i can't explain why.
i duplicated this problem on two machines. the details are in machine-details.txt.
here's the interesting part:
machine 2 is basically win10 winver 2004 with vscode ootb plus [email protected].
on machine 2, hashtable-formatting_BEFORE.ps1 formatted correctly.
then i copied my settings.json from machine 1 (win8.1) to machine 2.
when i reformatted hashtable-formatting_BEFORE.ps1 with the new settings.json, i got hashtable-formatting_AFTER.ps1.
@elrod-johnson Thank you for taking the time to provide details. This is very likely caused by your setting powershell.codeFormatting.whitespaceBetweenParameters being set to true. This is a new setting that we recently added and its default is false. This issue has already been fixed as part of #1498 but is pending a patch release of PSScriptAnalyzer, which we plan to do in the next few weeks. In the meantime we suggest to set the setting value to its default value of false.
FYI @rjmholt@JamesWTruher@SydneyhSmith
i've got a new problem with powershell formatting.
i upgraded to [email protected] an hour or two before i noticed this problem.
it may have existed prior to the upgrade, but i never noticed it.
it's particularly scary because i didn't notice it for some time until my code started failing.
the attached zip has all the files described below plus a debug log.
the before .ps1 code is in hashtable-formatting_BEFORE.ps1
and the after .ps1 code is in hashtable-formatting_AFTER.ps1
i tried to reproduce the problem in unaffected-hashtables.ps1 but the code here formatted correctly.
i can't explain why.
i duplicated this problem on two machines. the details are in machine-details.txt.
here's the interesting part:
machine 2 is basically win10 winver 2004 with vscode ootb plus [email protected].
on machine 2, hashtable-formatting_BEFORE.ps1 formatted correctly.
then i copied my settings.json from machine 1 (win8.1) to machine 2.
when i reformatted hashtable-formatting_BEFORE.ps1 with the new settings.json, i got hashtable-formatting_AFTER.ps1.
so take a look at settings.json.
thanks folks
powershell-preview-hashtable-format-error.zip
The text was updated successfully, but these errors were encountered: