-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add check for a non-zero value for tab width #7178
Conversation
I think you can use |
Thank you for the advice, I didn't know about this feature. I'll take some time to rewrite it |
I changed it, now it's more clear and also fixes the original issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you are at it could you limit the value to something reasonable like 16 at most?I am pretty sure the code doesn't correctly account for tab-width larger than 8 and I can't think of any usecase
Yes, I think that it's a reasonable change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah deserialization errors is how we usually handle invalid config. LGTM 👍
Closes #7094. I think it is weird to set tab width to zero, so I added a custom deserialization function (a small wrapper that checks if the tab width value is zero).