Skip to content
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

[master] DisallowSpaceIndentSniff + "tab_width=4" #299

Closed
aik099 opened this issue Oct 23, 2014 · 1 comment
Closed

[master] DisallowSpaceIndentSniff + "tab_width=4" #299

aik099 opened this issue Oct 23, 2014 · 1 comment

Comments

@aik099
Copy link
Contributor

aik099 commented Oct 23, 2014

When tab_width config option (or command line argument) is used, then each tab is converted to 4 spaces. In PHPCS 1.5.x this results in every sniff, that is looking specifically for TABs will fail, including DisallowSpaceIndentSniff.

In PHPCS 2.x version of that sniff this is fixed, because orig_content is used for checks, which still has TABs.

I wonder how safe it is to use tab_width option for projects, where TABs are used for indentation. I though it's main purpose was to help projects where indentation is done with spaces to deal with accidentally found TABs. Am I right?

@gsherwood
Copy link
Member

Yes, this is already "fixed" in the 2.x version. I'm not back-porting everything from 2.x to 1.x, so I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants