PowerShell / PowerShell/vscode-powershell
RFC: Change Pipeline Indentation Style default from `NoIndentation` to `IncreaseIndentationForFirstPipeline`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 547
- PR merge metrics
- No merged PRs in 30d
Description
Prerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been reported.
Summary
I've discovered that our default value to configure PSScriptAnalyzer's PipelineIndentation setting is NoIndentation, which differs from PSSA's own default (and arguably more popular) of IncreaseIndentationForFirstPipeline. This was last updated in May 2020 via https://github.com/PowerShell/vscode-powershell/pull/2698 which alludes to a bug in PSSA that I hope is since fixed.
@bergmeister in particular, what do you think?
Proposed Design
Just update the default in package.json to IncreaseIndentationForFirstPipeline. While I think this is a very desirable behavior, it would come at the cost of user-facing change that would affect formatting of scripts. So the question is, have the vast majority of people already overridden it with IncreaseIndentationForFirstPipeline?
Further RFC: Should we do a just an overhaul of all our default code formatting settings to match PSSA's defaults?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in package.json and compare the current PipelineIndentation default with PSScriptAnalyzer's PipelineIndentation documentation. The focused work is done when the default is changed to IncreaseIndentationForFirstPipeline; the broader question about aligning all formatting defaults needs a maintainer decision before expanding scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100