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
Using Invoke-Formatter, the suggested correction for correcting an Allman style brace with the pre-existing OTBS rules fails if there is a comment after the keyword. if ($bar) # this is the test {
Expected behavior would be that the brace is moved to a non-comment section. if ($bar) { # this is the test
Full Example:
$RulesDirectory=Join-Path-Path (Get-Module PSScriptAnalyzer -ListAvailable).ModuleBase -ChildPath 'Settings'$Settings=Import-PowerShellDataFile (Join-Path$RulesDirectory'CodeFormattingOTBS.psd1')
$Script=@'function foo { if ($bar) # this is the test { Write-Host "bar" }}'@$Formatted=Invoke-Formatter-Settings $Settings-ScriptDefinition $Script
The text was updated successfully, but these errors were encountered:
Using
Invoke-Formatter
, the suggested correction for correcting an Allman style brace with the pre-existing OTBS rules fails if there is a comment after the keyword.if ($bar) # this is the test {
Expected behavior would be that the brace is moved to a non-comment section.
if ($bar) { # this is the test
Full Example:
The text was updated successfully, but these errors were encountered: