if (true) {
\t console.log(true &&
\t ············false);
}
where \t`` ``is a tab, and· is a space, validateIndentation ignores disallowMixedSpacesAndTabs and throws an error "Invalid indentation character:". Turning on disallowMixedSpacesAndTabs throws 2 errors (one for each).
Take for example the following config:
(or if disallowMixedSpacesAndTabs is "smart")
And the following test file:
where
\t`` ``
is a tab, and·
is a space, validateIndentation ignores disallowMixedSpacesAndTabs and throws an error "Invalid indentation character:". Turning on disallowMixedSpacesAndTabs throws 2 errors (one for each).Correct me if I'm wrong, but isn't validateIndentation throwing false positives? Prior to https://github.com/jscs-dev/node-jscs/commit/d0c70f1c5763c923186945f4b2c10b1aab54e95e (which looks like a complete rewrite of validateIndentation) it wouldn't. Removing validate-indentation.js#L500-L506 seems to fix these problems and passes a npm test (however those mixed tab-spaces lines are not validated for indentation anymore, I believe). Thanks