Skip to content

Commit e2aa287

Browse files
committed
AC-1100: Catch badly put newlines in LESS files
1 parent 2fc6815 commit e2aa287

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Magento2/Sniffs/Less/ColonSpacingSniff.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function register()
3939
public function process(File $phpcsFile, $stackPtr)
4040
{
4141
$tokens = $phpcsFile->getTokens();
42-
42+
4343
if ($this->needValidateSpaces($phpcsFile, $stackPtr, $tokens)) {
4444
$this->validateSpaces($phpcsFile, $stackPtr, $tokens);
4545
}
@@ -75,7 +75,10 @@ private function needValidateSpaces(File $phpcsFile, $stackPtr, $tokens)
7575
}
7676

7777
/**
78-
* Validate Colon Spacing according to requirements
78+
* Validate Colon Spacing according to requirements:
79+
* - No spaces before colon
80+
* - Exactly 1 space after colon
81+
* - No property definition scattered among several lines
7982
*
8083
* @param File $phpcsFile
8184
* @param int $stackPtr

0 commit comments

Comments
 (0)