[wp-trac] [WordPress Trac] #46869: Fix PHPCS configuration
WordPress Trac
noreply at wordpress.org
Tue May 28 00:44:00 UTC 2019
#46869: Fix PHPCS configuration
------------------------------+-------------------------------
Reporter: azaozz | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: needs-testing | Focuses: coding-standards
------------------------------+-------------------------------
Comment (by azaozz):
In 46869.1.diff:
- Set `maxPadding` for `Generic.Formatting.MultipleStatementAlignment`.
That works well for preventing too many spaces when aligning `=`.
- Do not align `=>` across different dimensions of multidimensional
associative arrays. This fixes the edge case of having the parent array's
keys aligned across different blocks of code.
The last bit, setting `maxColumn` for
`WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned`
doesn't seem to do anything though, or perhaps I've run into another edge
case.
The idea there is to limit how much white space can be added when aligning
the `=>`, similarly to Generic.Formatting.MultipleStatementAlignment.
Also, it doesn't stop at the end of the code block, i.e. at an empty row
or empty row followed by a comment.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46869#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list