File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,15 @@ where-object {$_.Name -match 'powershell'}
124124 $violations.Count | Should Be 1
125125 }
126126
127+ It " Should not find a violation if a pipleline element is indented correctly" {
128+ $def = @'
129+ get-process |
130+ where-object {$_.Name -match 'powershell'}
131+ '@
132+ $violations = Invoke-ScriptAnalyzer - ScriptDefinition $def - Settings $settings
133+ $violations.Count | Should Be 0
134+ }
135+
127136 It " Should ignore comment in the pipleline" {
128137 $def = @'
129138 get-process |
@@ -134,14 +143,5 @@ select Name,Id |
134143 $violations = Invoke-ScriptAnalyzer - ScriptDefinition $def - Settings $settings
135144 $violations.Count | Should Be 3
136145 }
137-
138- It " Should not find a violation on a new line that follows a pipe" {
139- $def = @'
140- get-process |
141- where-object {$_.Name -match 'powershell'}
142- '@
143- $violations = Invoke-ScriptAnalyzer - ScriptDefinition $def - Settings $settings
144- $violations.Count | Should Be 0
145- }
146146 }
147147}
You can’t perform that action at this time.
0 commit comments