Skip to content

Commit 23a8926

Browse files
committed
Merge branch 'master' into report-memory-improvements
2 parents 2a6b31f + 49c025b commit 23a8926

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

CodeSniffer/Standards/Squiz/Sniffs/CSS/IndentationSniff.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
6969
$tokens = $phpcsFile->getTokens();
7070

7171
$numTokens = (count($tokens) - 2);
72-
$currentLine = 0;
7372
$indentLevel = 0;
7473
$nestingLevel = 0;
7574
for ($i = 1; $i < $numTokens; $i++) {
@@ -94,7 +93,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
9493
$indentLevel--;
9594
}
9695

97-
if ($tokens[$i]['line'] === $currentLine) {
96+
if ($tokens[$i]['column'] !== 1) {
9897
continue;
9998
}
10099

@@ -122,10 +121,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
122121
);
123122
$phpcsFile->addError($error, $i, 'Incorrect', $data);
124123
}
125-
126-
$currentLine = $tokens[$i]['line'];
127124
}//end foreach
128-
129125
}//end process()
130126

131127
}//end class

CodeSniffer/Standards/Squiz/Tests/CSS/IndentationUnitTest.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ td {
4242
}
4343

4444
}
45+
46+
.GUIFileUpload {
47+
/* opacity: 0.25; */
48+
}

package.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
6464
- Squiz LowercaseStyleDefinitionSniff no longer throws errors for class names in nested style definitions
6565
- Squiz ClassFileNameSniff no longer throws errors when checking STDIN
6666
- Squiz CSS sniffs no longer generate errors for IE filters
67+
- Squiz CSS IndentationSniff no longer sees comments as blank lines
6768
- Squiz LogicalOperatorSpacingSniff now ignores whitespace at the end of a line
6869
- Squiz.Scope.MethodScope.Missing error message now mentions 'visibility' instead of 'scope modifier'
6970
-- Thanks to Renat Akhmedyanov for the patch

0 commit comments

Comments
 (0)