We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 095767f commit 2f2f158Copy full SHA for 2f2f158
Tests/Rules/PlaceCloseBrace.tests.ps1
@@ -118,6 +118,16 @@ $x = if ($true) { "blah" } else { "blah blah" }
118
$violations = Invoke-ScriptAnalyzer -ScriptDefinition $def -Settings $settings
119
$violations.Count | Should Be 0
120
}
121
+
122
+ It "Should ignore violations for one line if statement even if NewLineAfter is true" {
123
+ $def = @'
124
+$x = if ($true) { "blah" } else { "blah blah" }
125
+'@
126
+ $ruleConfiguration.'IgnoreOneLineBlock' = $true
127
+ $ruleConfiguration.'NewLineAfter' = $true
128
+ $violations = Invoke-ScriptAnalyzer -ScriptDefinition $def -Settings $settings
129
+ $violations.Count | Should Be 0
130
+ }
131
132
133
Context "When a close brace should be follow a new line" {
0 commit comments