From 73e4e1bc8f938b11f96795f1e1a438b160359f20 Mon Sep 17 00:00:00 2001 From: Matthias Zeis Date: Sat, 2 Mar 2019 17:21:00 +0100 Subject: [PATCH] Move LineLength from ruleset to sniff (fixes #36) --- Magento/Sniffs/Files/LineLengthSniff.php | 10 +++++++ Magento/Tests/Files/LineLengthUnitTest.inc | 16 +++++++++++ Magento/Tests/Files/LineLengthUnitTest.php | 32 ++++++++++++++++++++++ Magento/ruleset.xml | 4 --- 4 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 Magento/Tests/Files/LineLengthUnitTest.inc create mode 100644 Magento/Tests/Files/LineLengthUnitTest.php diff --git a/Magento/Sniffs/Files/LineLengthSniff.php b/Magento/Sniffs/Files/LineLengthSniff.php index 528baeed..13bbb21a 100644 --- a/Magento/Sniffs/Files/LineLengthSniff.php +++ b/Magento/Sniffs/Files/LineLengthSniff.php @@ -19,6 +19,16 @@ class LineLengthSniff extends FilesLineLengthSniff */ protected $previousLineContent = ''; + /** + * @inheritdoc + */ + public $lineLimit = 120; + + /** + * @inheritdoc + */ + public $absoluteLineLimit = 120; + /** * @inheritdoc */ diff --git a/Magento/Tests/Files/LineLengthUnitTest.inc b/Magento/Tests/Files/LineLengthUnitTest.inc new file mode 100644 index 00000000..b4faf889 --- /dev/null +++ b/Magento/Tests/Files/LineLengthUnitTest.inc @@ -0,0 +1,16 @@ + 1 + ]; + } + + /** + * @inheritdoc + */ + public function getWarningList() + { + return []; + } +} diff --git a/Magento/ruleset.xml b/Magento/ruleset.xml index 40336962..184db8d5 100644 --- a/Magento/ruleset.xml +++ b/Magento/ruleset.xml @@ -118,10 +118,6 @@ warning - - - - 8 warning