-
Notifications
You must be signed in to change notification settings - Fork 19
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
no-tabs makes it hard to comment out code #116
Comments
Hm.. I'm struggling to see what this rule is trying to catch given we use tabs for indentation. Apart from indentation, tabs can appear in comments and as whitespace separation between syntax. It seems that in comments we would want to allow it. Between pieces of syntax we want to disallow it. But, I'd expect other rules to catch that already. E.g. a tab between |
Sadly they didn't, hence why we spotted a couple of issues when applying this in repos, e.g. in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikimediaEvents/+/475911/1/modules/all/ext.wikimediaEvents.citationUsage.js I'm not totally happy with how much this made us re-write code comment blocks, but the work is done, and I don't think reverting is worth the effort. |
Yeah - it caught other errors like |
Per discussion, can we just mark this issue as Closed? |
It should be valid in our rules by default to have documentation blocks that have indented code, and to be able to comment out multiple lines of code with
and
Unless we change that coding convention, I'm not sure violations from this all over the place are worthwhile the small gain in not having accidental tabs elsewhere in the code. I expect those to be rare mistakes, caught in code review, or otherwise fairly harmless to the readability and quality of the code. So my preference would be to disable the rule, and then invest in |
Commenting code line-by-line results in tabs in comments, which trigger a warning :/
The text was updated successfully, but these errors were encountered: