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 = @{
212212 $ruleConfiguration.CheckSeparator = $false
213213 $ruleConfiguration.IgnoreAssignmentOperatorInsideHashTable = $true
214214 }
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+
215228 It " Should not find violation if assignment operator is in multi-line hash table" {
216229 $def = @'
217230$ht = @{
@@ -628,11 +641,11 @@ bar -h i `
628641 }
629642
630643 It " Should fix script when a parameter value is a script block spanning multiple lines" {
631- $def = {foo {
644+ $def = {foo {
632645 bar
633646} - baz}
634647
635- $expected = {foo {
648+ $expected = {foo {
636649 bar
637650} - baz}
638651 Invoke-Formatter - ScriptDefinition " $def " - Settings $settings |
You can’t perform that action at this time.
0 commit comments