Code formatting

Open-source port of PoP that runs natively on Windows, Linux, etc.
Post Reply
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Code formatting

Post 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.
Falcury
Calif
Calif
Posts: 565
Joined: June 25th, 2009, 10:01 pm

Re: Code formatting

Post 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
Post Reply