Skip to content

Commit

Permalink
more format options
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemyslawKlys committed Aug 19, 2023
1 parent bb0de8e commit 2f4bb9d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Public/New-ConfigurationFormat.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
[switch] $EnableFormatting,

[validateSet('None', 'Asc', 'Desc')][string] $Sort,

[switch] $RemoveComments,
[switch] $RemoveEmptyLines,
[switch] $RemoveAllEmptyLines,
[switch] $RemoveCommentsInParamBlock,
[switch] $RemoveCommentsBeforeParamBlock,

[switch] $PlaceOpenBraceEnable,
[switch] $PlaceOpenBraceOnSameLine,
Expand Down Expand Up @@ -59,6 +64,18 @@
if ($PSBoundParameters.ContainsKey('RemoveComments')) {
$Formatting.RemoveComments = $RemoveComments.IsPresent
}
if ($PSBoundParameters.ContainsKey('RemoveEmptyLines')) {
$Formatting.RemoveEmptyLines = $RemoveEmptyLines.IsPresent
}
if ($PSBoundParameters.ContainsKey('RemoveAllEmptyLines')) {
$Formatting.RemoveAllEmptyLines = $RemoveAllEmptyLines.IsPresent
}
if ($PSBoundParameters.ContainsKey('RemoveCommentsInParamBlock')) {
$Formatting.RemoveCommentsInParamBlock = $RemoveCommentsInParamBlock.IsPresent
}
if ($PSBoundParameters.ContainsKey('RemoveCommentsBeforeParamBlock')) {
$Formatting.RemoveCommentsBeforeParamBlock = $RemoveCommentsBeforeParamBlock.IsPresent
}

$Formatting.FormatterSettings = [ordered] @{
IncludeRules = @(
Expand Down

0 comments on commit 2f4bb9d

Please sign in to comment.