Open liamjpeters opened 8 months ago
Hashtables with a single key-value pair should be ignored by PSAlignAssignmentStatement as there is nothing to align.
PSAlignAssignmentStatement
There are other rules that handle whitespace around operators etc which can handle formatting according to the users preference.
Currently:
Invoke-Formatter -ScriptDefinition "@{'Key'='Value'}" -Settings @{ Rules = @{ PSAlignAssignmentStatement = @{ Enable = $true CheckHashtable = $true } } }
Results in:
@{'Key' ='Value'}
Note the space added after the hashtable key
Resolves #1979
.cs
.ps1
.psm1
WIP:
My git-foo is not strong so this is a re-raise of https://github.com/PowerShell/PSScriptAnalyzer/pull/1983 where the full test checks were completed and passed
PR Summary
Hashtables with a single key-value pair should be ignored by
PSAlignAssignmentStatement
as there is nothing to align.There are other rules that handle whitespace around operators etc which can handle formatting according to the users preference.
Currently:
Results in:
Note the space added after the hashtable key
Resolves #1979
PR Checklist
.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
to the beginning of the title and remove the prefix when the PR is ready.