Improvements #10248
closedBite the bullet and purge tabs from Wt source code
100%
Description
At the moment we have a rather inconsistent indentation style: newer code uses 2 spaces per indentation level, no tabs, and older code uses 2 spaces per indentation level, and turning 8 spaces into a tab (this is what Emacs does by default).
If your editor is set correctly to 8 spaces per tab then the code will look fine, but some users will have their editor set incorrectly, and see a mess.
We'll have to bite the bullet and finally replace all tabs with spaces.
This will mess with the git history, but we can:
- Hide whitespace changes in GitLab and GitHub with a click of a button
- Use
git blame -w
if we want to ignore whitespace changes when blaming
Updated by Roel Standaert over 2 years ago
- Status changed from InProgress to Resolved
- % Done changed from 0 to 100
Updated by Christian Meyer over 2 years ago
Hey, just a comment, but should this problem not be easily achived by using a linter?
Might be a little longer to set up but should enable consistency for the future
Updated by Roel Standaert over 2 years ago
The issue was really with older code that still needed to be updated, all of the new code was already fine. I didn't go so far as to actually use something like a formatter, but we've had an .editorconfig
file for a while so that IDEs or editors that support it automatically adjust their settings.
If you are referring to the actual converting of tabs to spaces: that was easily fixed with some find
and sed
.
Updated by Roel Standaert over 2 years ago
- Status changed from Resolved to Closed