Skip to content
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

Add new powershell.codeFormatting settings for new options in PSSA 1.18: WhitespaceInsideBrace and WhitespaceAroundPipe #1668

Merged

Conversation

bergmeister
Copy link
Collaborator

@bergmeister bergmeister commented Dec 20, 2018

PR Summary

This PR exposes new settings to use the new PSSA settings from this PR.
The corresponding PR in PSES is here
This PR can only be merged once PSSA 1.18 has released and the dependent PSES has been merged.

PR Checklist

Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets.
Please mark anything not applicable to this PR NA.

  • PR has a meaningful title
  • Summarized changes
  • PR has tests
  • This PR is ready to merge and is not work in progress
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready

… powershell.codeFormatting.WhitespaceAroundPipe
@bergmeister
Copy link
Collaborator Author

The depending PSSA PR has been merged now (meaning the feature will be in 1.18), so only the release is blocking the PR from merging, can you please start the review @TylerLeonhardt or @rjmholt in the meantime?

@rjmholt rjmholt changed the title [Do not merge yet] Add new powershell.codeFormatting settings for new options in PSSA 1.18: WhitespaceInsideBrace and WhitespaceAroundPipe Add new powershell.codeFormatting settings for new options in PSSA 1.18: WhitespaceInsideBrace and WhitespaceAroundPipe Mar 5, 2019
@rjmholt
Copy link
Collaborator

rjmholt commented Mar 5, 2019

(Taken the merge note out, since we won't release before PSSA does)

package.json Outdated
"powershell.codeFormatting.WhitespaceInsideBrace": {
"type": "boolean",
"default": true,
"description": "Adds a space after an opening brace ('}') and before a closing brace ('}')."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You say "opening brace" but then use a closing brace as an example. I think that should be ('{').

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted, thanks. I fixed it

package.json Outdated
"powershell.codeFormatting.WhitespaceAroundPipe": {
"type": "boolean",
"default": true,
"description": "Adds a space before and after a pipeline ('|')."
Copy link
Collaborator

@rkeithhill rkeithhill Mar 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should refer to this symbol as it is referred to in the docs "pipeline operator" e.g. "... before and after the pipeline operator ('|').".

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
Copy link
Collaborator

@rkeithhill rkeithhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TylerLeonhardt TylerLeonhardt merged commit 3ea87d8 into PowerShell:master Mar 20, 2019
bergmeister pushed a commit to bergmeister/vscode-powershell that referenced this pull request Mar 20, 2019
…18: WhitespaceInsideBrace and WhitespaceAroundPipe (PowerShell#1668)

* Add new settings: powershell.codeFormatting.WhitespaceInsideBrace and powershell.codeFormatting.WhitespaceAroundPipe

* fix whitespace

* Apply suggestions from code review
This was referenced Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants