Skip to content

Commit 4ffe33a

Browse files
committed
Don't take in account the ignored (using codingStandardsIgnore) warnings and errors when using summary report
1 parent 138e931 commit 4ffe33a

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

CodeSniffer/File.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
* @author Marc McIntyre <[email protected]>
112112
* @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
113113
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
114-
* @version Release: 1.4.2
114+
* @version Release: @package_version@
115115
* @link http://pear.php.net/package/PHP_CodeSniffer
116116
*/
117117
class PHP_CodeSniffer_File
@@ -1107,7 +1107,7 @@ private static function _convertTabs(&$tokens, $tokenizer, $eolChar)
11071107

11081108
if (strpos($tokenContent, "\t") === false) {
11091109
// There are no tabs in this content.
1110-
$currColumn += (strlen($tokenContent) - 1);
1110+
$currColumn += strlen($tokenContent);
11111111
} else {
11121112
// We need to determine the length of each tab.
11131113
$tabs = preg_split(
@@ -1118,7 +1118,6 @@ private static function _convertTabs(&$tokens, $tokenizer, $eolChar)
11181118
);
11191119

11201120
$tabNum = 0;
1121-
$adjustedTab = false;
11221121
$tabsToSpaces = array();
11231122
$newContent = '';
11241123

@@ -1140,7 +1139,6 @@ private static function _convertTabs(&$tokens, $tokenizer, $eolChar)
11401139
// This is the first tab, and we are already at a
11411140
// tab stop, so this tab counts as a single space.
11421141
$currColumn++;
1143-
$adjustedTab = true;
11441142
} else {
11451143
$currColumn++;
11461144
while (($currColumn % PHP_CODESNIFFER_TAB_WIDTH) != 0) {
@@ -1155,19 +1153,13 @@ private static function _convertTabs(&$tokens, $tokenizer, $eolChar)
11551153
}//end if
11561154
}//end foreach
11571155

1158-
if ($tabNum === 1 && $adjustedTab === true) {
1159-
$currColumn--;
1160-
}
1161-
11621156
$tokens[$i]['content'] = $newContent;
11631157
}//end if
11641158

11651159
if (isset($tokens[($i + 1)]['line']) === true
11661160
&& $tokens[($i + 1)]['line'] !== $tokens[$i]['line']
11671161
) {
11681162
$currColumn = 1;
1169-
} else {
1170-
$currColumn++;
11711163
}
11721164
}//end for
11731165

0 commit comments

Comments
 (0)