File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -212,6 +212,19 @@ $ht = @{
212
212
$ruleConfiguration.CheckSeparator = $false
213
213
$ruleConfiguration.IgnoreAssignmentOperatorInsideHashTable = $true
214
214
}
215
+ It " Should not find violation if assignment operator is in multi-line hash table and a using statement is present" {
216
+ $def = @'
217
+ using system
218
+
219
+ $ht = @{
220
+ variable = 3
221
+ other = 4
222
+ }
223
+ '@
224
+ Invoke-ScriptAnalyzer - ScriptDefinition $def - Settings $settings | Should - Be $null
225
+ }
226
+
227
+
215
228
It " Should not find violation if assignment operator is in multi-line hash table" {
216
229
$def = @'
217
230
$ht = @{
@@ -628,11 +641,11 @@ bar -h i `
628
641
}
629
642
630
643
It " Should fix script when a parameter value is a script block spanning multiple lines" {
631
- $def = {foo {
644
+ $def = {foo {
632
645
bar
633
646
} - baz}
634
647
635
- $expected = {foo {
648
+ $expected = {foo {
636
649
bar
637
650
} - baz}
638
651
Invoke-Formatter - ScriptDefinition " $def " - Settings $settings |
You can’t perform that action at this time.
0 commit comments