Skip to content

Exclude xml files for LineLength rule ? #398

@Nuranto

Description

@Nuranto

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.

Activity

m2-assistant

m2-assistant commented on May 27, 2022

@m2-assistant

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


ihor-sviziev

ihor-sviziev commented on Jun 1, 2022

@ihor-sviziev
Collaborator

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

sivaschenko

sivaschenko commented on Jun 15, 2022

@sivaschenko
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Nuranto@ihor-sviziev@sivaschenko

        Issue actions

          Exclude xml files for LineLength rule ? · Issue #398 · magento/magento-coding-standard