Skip to content

Fixed issue in line length sniff for phrase and __ keyword #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 16, 2019

Conversation

konarshankar07
Copy link
Contributor

@konarshankar07 konarshankar07 commented Aug 11, 2019

Fixed #75 : [BUG] LineLengthSniff RegEx misses long lines with Phrase/__ keyword in string

Copy link
Contributor

@lenaorobei lenaorobei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Long time ago when this rule was introduced, the reason for it was that php bin/magento i18n:collect-phrases command couldn't work with concatenated strings. I just checked - now it can 🙂

So the fix here should be - remove this sniff code, from ruleset and unit test but add following to the ruleset in the alphabetical order to the <!-- Severity 6 warnings: Code style issues. --> section:

    <rule ref="Generic.Files.LineLength">
        <properties>
            <property name="lineLimit" value="120"/>
            <property name="absoluteLineLimit" value="0"/>
        </properties>
        <severity>6</severity>
        <type>warning</type>
    </rule>

konarshankar07 and others added 2 commits August 16, 2019 23:40
…into 75_linelengthsniff_keyword

# Conflicts:
#	Magento2/Tests/Files/LineLengthUnitTest.php
lenaorobei
lenaorobei previously approved these changes Aug 16, 2019
@lenaorobei lenaorobei merged commit 925b97b into magento:develop Aug 16, 2019
magento-devops-reposync-svc pushed a commit that referenced this pull request Nov 23, 2021
AC-1740: Add rectorphp as a dependency to magento-coding-standard and run it as part of the GitHub actions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] LineLengthSniff RegEx misses long lines with Phrase/__ keyword in string
2 participants