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
Extend UseConsistentWhitespace to pipe and curly braces #1065
Where-Object { $_.Name-eq"test" }
# And notWhere-Object {$_.Name-eq"test"}
The rule UseConsistentWhitespace is close to checking that. It already checks if there is a space between a keyword and a brace (CheckOpenBrace option), and if operators are surrounded by spaces (CheckOperator option).
Is it possible to add options to check those additional rules?
FYI: I started to work on this.
I am working on this branch here which can already detect violations of whitespaces inside curly braces and around pipes. I need to tweak it with the correct error messages and auto-correct suggestions. At the moment, the idea is to add 2 new options: CheckInnerBrace and CheckPipe. cc James Truher (@JamesWTruher)
Activity
bergmeister commentedon Sep 3, 2018
Yes, this sounds like a reasonable request to add this option (and potentially enable it by default)
bergmeister commentedon Sep 25, 2018
FYI: I started to work on this.
I am working on this branch here which can already detect violations of whitespaces inside curly braces and around pipes. I need to tweak it with the correct error messages and auto-correct suggestions. At the moment, the idea is to add 2 new options:
CheckInnerBraceandCheckPipe. cc James Truher (@JamesWTruher)avalery commentedon Sep 29, 2018
Great ! It looks good like this.