Skip to content

PSSA 1.19.0 settings #1280

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 6 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
2 changes: 1 addition & 1 deletion modules.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"PSScriptAnalyzer":{
"MinimumVersion":"1.18.3",
"MinimumVersion":"1.19.0",
"MaximumVersion":"1.99"
},
"Plaster":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,12 @@ internal enum PipelineIndentationStyle
/// <summary>
/// Do not increase indentation level at all after pipeline.
/// </summary>
NoIndentation
NoIndentation,

/// <summary>
/// Do not change pipeline indentation level at all.
/// </summary>
None,
}

internal class CodeFormattingSettings
Expand Down Expand Up @@ -206,18 +211,20 @@ public CodeFormattingSettings(CodeFormattingSettings codeFormattingSettings)
}
}

public bool AddWhitespaceAroundPipe { get; set; }
public bool AutoCorrectAliases { get; set; }
public CodeFormattingPreset Preset { get; set; }
public bool OpenBraceOnSameLine { get; set; }
public bool NewLineAfterOpenBrace { get; set; }
public bool NewLineAfterCloseBrace { get; set; }
public PipelineIndentationStyle PipelineIndentationStyle { get; set; }
public bool TrimWhitespaceAroundPipe { get; set; }
public bool WhitespaceBeforeOpenBrace { get; set; }
public bool WhitespaceBeforeOpenParen { get; set; }
public bool WhitespaceAroundOperator { get; set; }
public bool WhitespaceAfterSeparator { get; set; }
public bool WhitespaceBetweenParameters { get; set; }
public bool WhitespaceInsideBrace { get; set; }
public bool WhitespaceAroundPipe { get; set; }
public bool IgnoreOneLineBlock { get; set; }
public bool AlignPropertyValuePairs { get; set; }
public bool UseCorrectCasing { get; set; }
Expand Down Expand Up @@ -294,7 +301,9 @@ private Hashtable GetCustomPSSASettingsHashtable(int tabSize, bool insertSpaces)
{ "CheckOperator", WhitespaceAroundOperator },
{ "CheckSeparator", WhitespaceAfterSeparator },
{ "CheckInnerBrace", WhitespaceInsideBrace },
{ "CheckPipe", WhitespaceAroundPipe },
{ "CheckParameter", WhitespaceBetweenParameters },
{ "CheckPipe", AddWhitespaceAroundPipe },
{ "CheckPipeForRedundantWhitespace", TrimWhitespaceAroundPipe },
}},
{ "PSAlignAssignmentStatement", new Hashtable {
{ "Enable", true },
Expand Down