-- this comment is on the margin, the code is indented
youCantDo("this kind of",
"function parameter",
"mixing tabs and spaces") -- this comment is on the margin, the code is indented
youCantDo("this kind of",
"function parameter",
"mixing tabs and spaces") youCanDo(
"this kind of",
"function parameter",
"with just tabs"
)Vertical space is at a premium, and 'wasting' five lines when three will do strikes me as uglier than the opposite. Adjusting spaces when things get refactored doesn't strike me as especially tedious, but YMMV.
I don't go so far as to support "lisp style" closing braces for brace-block languages, though. It's just too weird.
It's our own fault, we have no excuse, and it galls me to serve a dumb line-based algorithm over the writers and readers of my code.
-- this comment is on the margin, the code is indented
youCantDo("this kind of",
"function parameter",
"mixing tabs and spaces")Fix it and I'll merge: except I wouldn't see it because CI won't pass code with tabs in it.
The three lines of code all start with exactly one tab. The second two lines each have 10 spaces after their initial tab.
I don't think even emacs has good support otb for mixed tabs like that. The typical behavior is to convert all spaces at beginning of line that are multiples of tab-width to tabs.
Can you write a linter for this which doesn't contain a complete parser for your language?
Which respectable text editor in 2021 doesn't have an option to show whitespace?
> Can you write a linter for this
Every linter uses a "complete parser", else it wouldn't be a linter.