You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wrong indentation for passed scriptblocks in pipe sequence (PSUseConsistentIndentation) #1066
Thanks for raising it and sorry for coming back quite late to this. This has annoyed me sometimes as well. I will start to look into this so that we hopefully have a fix in the next version of PSSA
I had a look at this, a slightly more simplified example for this issue is (the problem is that there is more than 1 line after 1 pipeline)
Get-ChildItem|ForEach-Object {
$_.ToString()
}
I will try to see if I can come up with a fix for this, as far as I can see, pipes are being catered for but the author decided to give them only 'temporary' indentation for the next line after the ppipe because the rule only looks at tokens and therefore does not know when the pipe ends. I will try to see if I can fix this. Felix Becker (@felixfbecker) Why do you not expect the correct formatting to be this?
Activity
bergmeister commentedon Nov 5, 2018
Thanks for raising it and sorry for coming back quite late to this. This has annoyed me sometimes as well. I will start to look into this so that we hopefully have a fix in the next version of PSSA
bergmeister commentedon Nov 14, 2018
I had a look at this, a slightly more simplified example for this issue is (the problem is that there is more than 1 line after 1 pipeline)
I will try to see if I can come up with a fix for this, as far as I can see, pipes are being catered for but the author decided to give them only 'temporary' indentation for the next line after the ppipe because the rule only looks at tokens and therefore does not know when the pipe ends. I will try to see if I can fix this.
Felix Becker (@felixfbecker) Why do you not expect the correct formatting to be this?