Skip to content

PSSA 1.19.0 settings #2674

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

Merged
merged 3 commits into from
May 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -656,10 +656,11 @@
"enum": [
"IncreaseIndentationForFirstPipeline",
"IncreaseIndentationAfterEveryPipeline",
"NoIndentation"
"NoIndentation",
"None"
],
"default": "NoIndentation",
"description": "Multi-line pipeline style settings."
"default": "None",
"description": "Multi-line pipeline style settings (default: None)."
},
"powershell.codeFormatting.whitespaceBeforeOpenBrace": {
"type": "boolean",
Expand All @@ -686,10 +687,20 @@
"default": true,
"description": "Adds a space after an opening brace ('{') and before a closing brace ('}')."
},
"powershell.codeFormatting.whitespaceAroundPipe": {
"powershell.codeFormatting.whitespaceBetweenParameters": {
"type": "boolean",
"default": false,
"description": "Removes redundant whitespace between parameters."
},
"powershell.codeFormatting.addWhitespaceAroundPipe": {
"type": "boolean",
"default": true,
"description": "Adds a space before and after the pipeline operator ('|')."
"description": "Adds a space before and after the pipeline operator ('|') if it is missing."
},
"powershell.codeFormatting.trimWhitespaceAroundPipe": {
"type": "boolean",
"default": false,
"description": "Trims extraneous whitespace (more than 1 character) before and after the pipeline operator ('|')."
},
"powershell.codeFormatting.ignoreOneLineBlock": {
"type": "boolean",
Expand Down
13 changes: 9 additions & 4 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ enum PipelineIndentationStyle {
IncreaseIndentationForFirstPipeline,
IncreaseIndentationAfterEveryPipeline,
NoIndentation,
None,
}

export enum HelpCompletion {
Expand Down Expand Up @@ -51,8 +52,10 @@ export interface ICodeFormattingSettings {
whitespaceBeforeOpenParen: boolean;
whitespaceAroundOperator: boolean;
whitespaceAfterSeparator: boolean;
whitespaceInsideBrace: true;
whitespaceAroundPipe: true;
whitespaceBetweenParameters: boolean;
whitespaceInsideBrace: boolean;
addWhitespaceAroundPipe: boolean;
trimWhitespaceAroundPipe: boolean;
ignoreOneLineBlock: boolean;
alignPropertyValuePairs: boolean;
useCorrectCasing: boolean;
Expand Down Expand Up @@ -158,13 +161,15 @@ export function load(): ISettings {
openBraceOnSameLine: true,
newLineAfterOpenBrace: true,
newLineAfterCloseBrace: true,
pipelineIndentationStyle: PipelineIndentationStyle.NoIndentation,
pipelineIndentationStyle: PipelineIndentationStyle.None,
whitespaceBeforeOpenBrace: true,
whitespaceBeforeOpenParen: true,
whitespaceAroundOperator: true,
whitespaceAfterSeparator: true,
whitespaceBetweenParameters: false,
whitespaceInsideBrace: true,
whitespaceAroundPipe: true,
addWhitespaceAroundPipe: true,
trimWhitespaceAroundPipe: false,
ignoreOneLineBlock: true,
alignPropertyValuePairs: true,
useCorrectCasing: false,
Expand Down