Page 1 of 1

PowerShell spacing option between type and name

Posted: Mon May 11, 2020 7:06 pm
by JohnMoe
Currently, when I define a variable like this:

Code: Select all

[System.String] $myString
PowerShell Studio keeps "correcting" it to:

Code: Select all

[System.String]$myString
In my view, this mashes it together and makes it less readable. Can you please add a spacing option to leave that space?

Re: PowerShell spacing option between type and name

Posted: Mon May 11, 2020 8:16 pm
by Alexander Riedel
It is actually very common practice to 'mash', as you say, the type specifier and the object or variable together like that. In almost every language I know.
My personal opinion is that this actually enhances readability, since it makes the type cast stand out.
But I will of course forward your request to the team.