-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spaces or indentation not detected #31
Comments
@YanweiJiang can you please provide me with a sample php file that has this behaviour? |
Can you please change the file extension to php and give it a go? thanks |
@YanweiJiang I can confirm that this is happening and feels like a phpcs bug so I opened a bug here squizlabs/PHP_CodeSniffer#1345 |
agree. I tried in Sublime 3, it has the same issue. |
@YanweiJiang According to squizlabs/PHP_CodeSniffer#1345 this is intended behavior so I am closing this issue. If you wish to apply more strict rules the following ruleset.xml configuration works the way you want: <rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="exact" value="true" />
</properties>
</rule> See relevant https://github.com/squizlabs/PHP_CodeSniffer/wiki/Customisable-Sniff-Properties#genericwhitespacescopeindent |
Cool. Thank you |
Using php standard PSR2:
when indented 2 spaces, it will complain and lint correctly;
when indented 6 or more spaces or multiple tabs, it will not complain and ignore
The text was updated successfully, but these errors were encountered: