Skip to content

Commit 241ed02

Browse files
bergmeisterChristoph Bergmeister
and
Christoph Bergmeister
authored
PSSA 1.19.0 settings (#1280)
* PSSA 1.19.0 settings support * fix pssa wiring * remove trailing whitespace * define None option for PipelineIndentationStyle * set pssa version to 1.19.0 * re-trigger CI because PSSA 1.19.0 has released Co-authored-by: Christoph Bergmeister <christoph.bergmeister@bjss.com>
1 parent 5f6e1a6 commit 241ed02

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

modules.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"PSScriptAnalyzer":{
3-
"MinimumVersion":"1.18.3",
3+
"MinimumVersion":"1.19.0",
44
"MaximumVersion":"1.99"
55
},
66
"Plaster":{

src/PowerShellEditorServices/Services/Workspace/LanguageServerSettings.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,12 @@ internal enum PipelineIndentationStyle
177177
/// <summary>
178178
/// Do not increase indentation level at all after pipeline.
179179
/// </summary>
180-
NoIndentation
180+
NoIndentation,
181+
182+
/// <summary>
183+
/// Do not change pipeline indentation level at all.
184+
/// </summary>
185+
None,
181186
}
182187

183188
internal class CodeFormattingSettings
@@ -206,18 +211,20 @@ public CodeFormattingSettings(CodeFormattingSettings codeFormattingSettings)
206211
}
207212
}
208213

214+
public bool AddWhitespaceAroundPipe { get; set; }
209215
public bool AutoCorrectAliases { get; set; }
210216
public CodeFormattingPreset Preset { get; set; }
211217
public bool OpenBraceOnSameLine { get; set; }
212218
public bool NewLineAfterOpenBrace { get; set; }
213219
public bool NewLineAfterCloseBrace { get; set; }
214220
public PipelineIndentationStyle PipelineIndentationStyle { get; set; }
221+
public bool TrimWhitespaceAroundPipe { get; set; }
215222
public bool WhitespaceBeforeOpenBrace { get; set; }
216223
public bool WhitespaceBeforeOpenParen { get; set; }
217224
public bool WhitespaceAroundOperator { get; set; }
218225
public bool WhitespaceAfterSeparator { get; set; }
226+
public bool WhitespaceBetweenParameters { get; set; }
219227
public bool WhitespaceInsideBrace { get; set; }
220-
public bool WhitespaceAroundPipe { get; set; }
221228
public bool IgnoreOneLineBlock { get; set; }
222229
public bool AlignPropertyValuePairs { get; set; }
223230
public bool UseCorrectCasing { get; set; }
@@ -294,7 +301,9 @@ private Hashtable GetCustomPSSASettingsHashtable(int tabSize, bool insertSpaces)
294301
{ "CheckOperator", WhitespaceAroundOperator },
295302
{ "CheckSeparator", WhitespaceAfterSeparator },
296303
{ "CheckInnerBrace", WhitespaceInsideBrace },
297-
{ "CheckPipe", WhitespaceAroundPipe },
304+
{ "CheckParameter", WhitespaceBetweenParameters },
305+
{ "CheckPipe", AddWhitespaceAroundPipe },
306+
{ "CheckPipeForRedundantWhitespace", TrimWhitespaceAroundPipe },
298307
}},
299308
{ "PSAlignAssignmentStatement", new Hashtable {
300309
{ "Enable", true },

0 commit comments

Comments
 (0)