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
This constrains the behavior of PlaceCloseBrace rule when NewLineAfter option is set to true. Previously, if this option is set to true, the rule will trigger on any close brace that is not followed by a new line except if the close brace is part of a command element AND script block expression. This caused the rule to be too aggressive. We illustrate two such instances.
In the following instance the rule would add a new line between the close brace and the comma following it, which makes the command expression invalid.
```powershell
Some-Command -Param1 @{
key="value"
},@{
key="value"
}
```
would get formatted to
```powershell
Some-Command -Param1 @{
key="value"
}
,@{
key="value"
}
```
In the following instance the rule would add a new line between the close brace and the parameter following it, which again makes the command expression invalid.
```powershell
Some-Command -Param1 @{
key="value"
} -Param2
```
would get formatted to
```powershell
Some-Command -Param1 @{
key="value"
}
-Param2
```
0 commit comments