Our source uses tabs instead of spaces. Can ktlint have support for "indent_style = tab" in the .editorconfig?
And yes, I know you can unset the indent_style, but that will also allow indenting with spaces, which we don't want.
I don't think we would want that. Also the Android Kotlin style guide forbid them.
Some people aren't writing Android code. Some people writing Android code use tabs. I think having the option is good.
The compiler decides what is legal syntax. It's productive for a team to all use the same coding standards so that everyone's code is more uniform and easier for everyone to read. I would love it if everyone used the official Kotlin style guide, but for various reasons all teams don't want to do that.
But if the syntax allows tabs, then why would a coding style checking tool not allow the same flexibility as the language itself? It seems this kind of restriction would have been better placed in the Kotlin compiler, and putting it in a coding style checking tool just means some people won't be able to use ktlint?
Or wait for someone to fork klint and add support for tabs ?
And as @ebrowne72 said, Kotlin is not used only for Android related code.
possible values: number (e.g. 2), "unset" (makes ktlint ignore indentation completely)
indent_size=4
"makes ktlint ignore indentation completely" -> even tabs ?
https://twitter.com/shyiko/status/1028740776191090688 (tldr: send a PR and we'll merge it in)
@ebrowne72 What are you using now? Can you not use indent_style = "tab"?
@jaredsburrows I am not using ktlint at all because it doesn't support tabs. What I'm asking for is someone to add support for indent_style = "tab".
So still no one with enough motivation to make a PR for this? :(
Most helpful comment
Some people aren't writing Android code. Some people writing Android code use tabs. I think having the option is good.