Page 1 of 1

Code formatting

Posted: June 26th, 2017, 6:46 pm
by David
From viewtopic.php?p=21471#p21471 :
David wrote: I looked through the SDLPoP sources.
Indentation is mostly done using tabs, but there are a few places that use spaces.
I guess I should fix that.
This is what I have now: https://github.com/NagyD/SDLPoP/commits/fix-identation (separate branch)

What bothers me is that then Blame will show my name at places where I only fixed the indentation.
Oh well.

Re: Code formatting

Posted: June 27th, 2017, 5:50 pm
by Falcury
I think the editor I use (CLion) only has settings for either tabs or spaces as leading whitespace. As far as I can tell indentation and alignment are not really distinguished?
See: https://www.jetbrains.com/help/clion/ch ... ation.html

(So my expectation is that a mixed scheme will not be obeyed by the automatic code formatting features of the editor...)

Oh no, my bad, I think I found the setting (Smart Tabs):
https://www.jetbrains.com/help/clion/co ... e-c-c.html

And I also read Norbert's document about the pros and cons of tabs versus spaces just now, which the topic of the thread you linked to in the opening post. Interesting stuff. I don't think I realized before that there are sensible in-between options for the tabs-versus-spaces problem :P