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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 0 additions & 132 deletions Magento2/Sniffs/Files/LineLengthSniff.php

This file was deleted.

2 changes: 1 addition & 1 deletion Magento2/Sniffs/PHP/FinalImplementationSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function register()
public function process(File $phpcsFile, $stackPtr)
{
$phpcsFile->addError(
// phpcs:ignore Magento2.Files.LineLength.MaxExceeded
// phpcs:ignore Generic.Files.LineLength
'Final keyword is prohibited in Magento. It decreases extensibility and is not compatible with plugins and proxies.',
$stackPtr,
'FoundFinal'
Expand Down
2 changes: 1 addition & 1 deletion Magento2/Sniffs/Security/LanguageConstructSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class LanguageConstructSniff implements Sniff
/**
* String representation of backtick error.
*
* phpcs:disable Magento2.Files.LineLength.MaxExceeded
* phpcs:disable Generic.Files.LineLength
*
* @var string
*/
Expand Down
2 changes: 1 addition & 1 deletion Magento2/Sniffs/Strings/ExecutableRegExSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ExecutableRegExSniff implements Sniff
/**
* String representation of error.
*
* phpcs:disable Magento2.Files.LineLength.MaxExceeded
* phpcs:disable Generic.Files.LineLength
*
* @var string
*/
Expand Down
31 changes: 0 additions & 31 deletions Magento2/Tests/Files/LineLengthUnitTest.inc

This file was deleted.

30 changes: 0 additions & 30 deletions Magento2/Tests/Files/LineLengthUnitTest.php

This file was deleted.

13 changes: 8 additions & 5 deletions Magento2/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,6 @@
<exclude-pattern>*/Test/*</exclude-pattern>
<exclude-pattern>*Test.php</exclude-pattern>
</rule>
<rule ref="Magento2.Files.LineLength">
<severity>8</severity>
<type>warning</type>
<exclude-pattern>*.phtml</exclude-pattern>
</rule>
<rule ref="Magento2.NamingConvention.InterfaceName">
<severity>8</severity>
<type>warning</type>
Expand Down Expand Up @@ -306,6 +301,14 @@
<severity>6</severity>
<type>warning</type>
</rule>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="0"/>
</properties>
<severity>6</severity>
<type>warning</type>
</rule>
<rule ref="Generic.Formatting.DisallowMultipleStatements">
<severity>6</severity>
<type>warning</type>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You can achieve this by adding the following to your project's `composer.json`:
````
"scripts": {
"post-install-cmd": [
"([ $COMPOSER_DEV_MODE -eq 1 ] && vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/) || true"
"([ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/)"
],
"post-update-cmd": [
"([ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/)"
Expand Down