Skip to content
This repository was archived by the owner on Feb 24, 2021. It is now read-only.

Update indentation style in settings.json (VS Code formatting) #27

Open
johlju opened this issue Jun 7, 2019 · 6 comments
Open

Update indentation style in settings.json (VS Code formatting) #27

johlju opened this issue Jun 7, 2019 · 6 comments
Labels
enhancement The issue is an enhancement request. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub help wanted The issue is up for grabs for anyone in the community.

Comments

@johlju
Copy link
Contributor

johlju commented Jun 7, 2019

We should add this to the VSCode settings.json

"powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationAfterEveryPipeline"

Or

"powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationForFirstPipeline"

The default is no indentation.

@johlju
Copy link
Contributor Author

johlju commented Jun 7, 2019

I vote for IncreaseIndentationAfterEveryPipeline

@johlju johlju added enhancement The issue is an enhancement request. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub help wanted The issue is up for grabs for anyone in the community. labels Jun 7, 2019
@johlju
Copy link
Contributor Author

johlju commented Jun 7, 2019

There are issues with this PowerShell/PSScriptAnalyzer#1241 (comment)

@johlju
Copy link
Contributor Author

johlju commented Jun 7, 2019

This does not really work for tests. If we add this I don't think we can enforce it on Pester tests.
PowerShell/PSScriptAnalyzer#1241 (comment)

The issue has been resolved, so now the user need to move the portion to the right to a new line for the indentation to format. This is the behavior we like because we don't want it to update all the tests.

@johlju
Copy link
Contributor Author

johlju commented Jun 17, 2019

I read that the default in PSScriptAnalyzer for this property will eventually be IncreaseIndentationForFirstPipeline, so maybe we should go with that. 🤔

@johlju
Copy link
Contributor Author

johlju commented Jun 17, 2019

We should also add this once VS Code PowerShell extension has added the latest version to the extension, otherwise depending on version installed this will have different behavior.

@PlagueHO
Copy link
Contributor

Get's my vote!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement The issue is an enhancement request. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

2 participants