Skip to content

Commit 925b97b

Browse files
authored
Merge pull request #127 from konarshankar07/75_linelengthsniff_keyword
Fixed issue in line length sniff for phrase and __ keyword
2 parents 1bdb24d + 5016c63 commit 925b97b

8 files changed

+12
-202
lines changed

Magento2/Sniffs/Files/LineLengthSniff.php

-132
This file was deleted.

Magento2/Sniffs/PHP/FinalImplementationSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function register()
2727
public function process(File $phpcsFile, $stackPtr)
2828
{
2929
$phpcsFile->addError(
30-
// phpcs:ignore Magento2.Files.LineLength.MaxExceeded
30+
// phpcs:ignore Generic.Files.LineLength
3131
'Final keyword is prohibited in Magento. It decreases extensibility and is not compatible with plugins and proxies.',
3232
$stackPtr,
3333
'FoundFinal'

Magento2/Sniffs/Security/LanguageConstructSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class LanguageConstructSniff implements Sniff
2323
/**
2424
* String representation of backtick error.
2525
*
26-
* phpcs:disable Magento2.Files.LineLength.MaxExceeded
26+
* phpcs:disable Generic.Files.LineLength
2727
*
2828
* @var string
2929
*/

Magento2/Sniffs/Strings/ExecutableRegExSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ExecutableRegExSniff implements Sniff
1717
/**
1818
* String representation of error.
1919
*
20-
* phpcs:disable Magento2.Files.LineLength.MaxExceeded
20+
* phpcs:disable Generic.Files.LineLength
2121
*
2222
* @var string
2323
*/

Magento2/Tests/Files/LineLengthUnitTest.inc

-31
This file was deleted.

Magento2/Tests/Files/LineLengthUnitTest.php

-30
This file was deleted.

Magento2/ruleset.xml

+8-5
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,6 @@
172172
<exclude-pattern>*/Test/*</exclude-pattern>
173173
<exclude-pattern>*Test.php</exclude-pattern>
174174
</rule>
175-
<rule ref="Magento2.Files.LineLength">
176-
<severity>8</severity>
177-
<type>warning</type>
178-
<exclude-pattern>*.phtml</exclude-pattern>
179-
</rule>
180175
<rule ref="Magento2.NamingConvention.InterfaceName">
181176
<severity>8</severity>
182177
<type>warning</type>
@@ -306,6 +301,14 @@
306301
<severity>6</severity>
307302
<type>warning</type>
308303
</rule>
304+
<rule ref="Generic.Files.LineLength">
305+
<properties>
306+
<property name="lineLimit" value="120"/>
307+
<property name="absoluteLineLimit" value="0"/>
308+
</properties>
309+
<severity>6</severity>
310+
<type>warning</type>
311+
</rule>
309312
<rule ref="Generic.Formatting.DisallowMultipleStatements">
310313
<severity>6</severity>
311314
<type>warning</type>

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ You can achieve this by adding the following to your project's `composer.json`:
1212
````
1313
"scripts": {
1414
"post-install-cmd": [
15-
"([ $COMPOSER_DEV_MODE -eq 1 ] && vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/) || true"
15+
"([ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/)"
1616
],
1717
"post-update-cmd": [
1818
"([ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/)"

0 commit comments

Comments
 (0)