-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Sets sw=6, ts=8 when file uses tabs #65
Comments
Perhaps a user-settable variable to allow a person do define 2, 4, or 8 (etc) spaces as default if there are only TABs? |
This may help detecting the causes in the provided file: |
We do respect I'm not seeing an obvious fix here. While a single line 6 space indent is almost certainly spurious, that's not very far from a sole pair of 4 space indents, which is valid: class MixedFile {
public static void main(String[] args) {
System.out.println("This file uses sw=4 ts=8 noet");
}
} Where do we draw the line? I do have a fix coming for this particular example in the form of EditorConfig support. The repository in question has a [*.{c,h,sh,perl,pl,pm,txt}]
indent_style = tab
tab_width = 8 |
Looks like disallowing 6 as a valid indent level does allow it to detect this file as Specifically, I changed the even number requirement to a multiple of 4 requirement, and given precedence to 4 and 8 over the uncommon (but still occasionally used 3. I'm retaining support for large multiples of 4 because they have niche uses (e.g., I like |
Thanks for resolving this! 🎉🥳 |
Here's the file:
https://raw.githubusercontent.com/git/git/master/git-add--interactive.perl
I was expecting
sw=4, ts=4
(preferred) or a leastsw=8, ts=8
.The text was updated successfully, but these errors were encountered: