You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ phpcs -s test.php
--------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
6 | ERROR | [x] Line indented incorrectly; expected at least 6 spaces, found 4
| | (Generic.WhiteSpace.ScopeIndent.Incorrect)
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------
An attempt to auto-fix the file fails:
PHPCBF RESULT SUMMARY
----------------------------------------------------------------------
FILE FIXED REMAINING
----------------------------------------------------------------------
/home/morozov/Projects/test/test.php FAILED TO FIX
----------------------------------------------------------------------
A TOTAL OF 0 ERRORS WERE FIXED IN 1 FILE
----------------------------------------------------------------------
PHPCBF FAILED TO FIX 1 FILE
----------------------------------------------------------------------
The issue itself looks like a false positive since the expected number of spaces should be multiple of 4 (the tab width). The failure to fix most likely means that the sniff conflicts with some other (valid) sniff.
The text was updated successfully, but these errors were encountered:
gsherwood
changed the title
False positive and a failure to fix
Generic.WhiteSpace.ScopeIndent false positive when opening and closing tag on same line inside conditional
Nov 17, 2020
The issue is reproducible on PHP_CodeSniffer version 3.5.4. Consider the following code example and standard configuration:
The following violations are reported:
An attempt to auto-fix the file fails:
The issue itself looks like a false positive since the expected number of spaces should be multiple of 4 (the tab width). The failure to fix most likely means that the sniff conflicts with some other (valid) sniff.
The text was updated successfully, but these errors were encountered: