Skip to content

Script formatting should allow setting for space between keyword and opening paren #446

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

Closed
rkeithhill opened this issue Jan 19, 2017 · 2 comments
Assignees
Labels
Area-Code Formatting Issue-Enhancement A feature request (enhancement).
Milestone

Comments

@rkeithhill
Copy link
Contributor

For instance, I prefer to see:

if (Test-Path foo) {
   "Foo exists!"
}

instead of

if(Test-Path foo) {
   "Foo exists!"
}

Same would apply to other keywords: elseif, for, foreach, while, switch, etc.

@rkeithhill rkeithhill added Issue-Enhancement A feature request (enhancement). Area-Code Formatting labels Jan 19, 2017
@daviwil
Copy link
Contributor

daviwil commented Jan 19, 2017

This should also cover spaces around equals signs, like in this example:

foreach($thing in $list){$result=Get-Thing $thing}

The resulting output should be:

foreach ($thing in $list) {
    $result = Get-Thing $thing
}

@daviwil daviwil added this to the 0.10.0 milestone Jan 19, 2017
@Jaykul
Copy link

Jaykul commented Jan 19, 2017

And the space between the closing parenthesis and the brace (which I was happy to see you both added).
And making sure it's only one space. Currently it doesn't even do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Code Formatting Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

No branches or pull requests

4 participants