magento-coding-standard icon indicating copy to clipboard operation
magento-coding-standard copied to clipboard

Exclude xml files for LineLength rule ?

Open Nuranto opened this issue 3 years ago • 3 comments
trafficstars

I don't think having LineLength rule for xml is relevant. With XML indentation and a lot of nested tags (ie. system.xml), or with some tags that must have a full classname (ie. di.xml), it can be very counterproductive if not impossible.

That led us to exclude this rule from our checks, which is a shame since we don't see anymore legit alerts on .php files.

I suggest adding <exclude-pattern>*\.xml$</exclude-pattern> to it.

Nuranto avatar May 27 '22 10:05 Nuranto

Hi @Nuranto. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


m2-assistant[bot] avatar May 27 '22 10:05 m2-assistant[bot]

I think it's a good idea to ignore XML files, or just add an exception for long class names and leave it enabled for all other lines

ihor-sviziev avatar Jun 01 '22 14:06 ihor-sviziev

I'd keep the limitation for xml files, however, increase it for example twice to 240 characters.

sivaschenko avatar Jun 15 '22 16:06 sivaschenko