Closed Konfekt closed 6 months ago
I don't think this is a good idea. When there is a single indented line in a file it's more likely than not the true indentation level of the file. Sure, there can be outliers, but without being more clever the best thing we can do is assume the most likely scenario which is that the indentation we see is the true indentation.
When there are only one or two indented lines, it is rather unlikely that an indent of 5 or 7, say, was indented by the user, but rather accidental. Therefore, only accept common values to keep out of the way.
This gives me the following idea: if there are only one or two indented lines, only accept common indents like 2, 4 (maybe 8). This would solve both #4 and #6. What do you think?
Yes, I agree. The two line limit is arbitrary, of course. Still, indent increases > 8 should be disregarded as well, as your example in #5 shows.
Merged! I don't think disregarding indentations > 8 is necessary as this already covers the example in #5.
addresses #6