Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Hard tabs or soft tabs?
(1/1)
280Z28:
This thread is not about your personal preference. It is about what the C::B project leaders decide will be used in this project.
There are lots of inconsistencies in the C::B source. Even single functions will sometimes go back and forth with hard tabs or soft tabs 5 times.
The project leaders need to make a decision on what the official tab setting for C::B source will be. Then, from here on out people will be expected to use that format. Right now things are so scattered I didn't know which one to use at times. I tried to use the format that the majority of a given file was in when I started. The sdk/ directory alone has many files with mostly hard tabs and many files with mostly soft tabs.
I will not even state my personal preference here. I am just waiting for an answer from rick or thomas or mandrev (sp?) as to what I should use.
I bolded those lines to emphasize that I'm only looking for an answer, not looking to start an argument.
thomas:
There is only one project leader, and the Ring answers to him alone. :lol:
Anyway. When I started working on Code::Blocks, Yiannis asked me "About coding style, could you please do this... and that..." and I replied "Oh darn, I am doing my formatting using the AStyle plugin...". So he said "just set the style to ANSI and you'll be fine".
Since that day, I am using the code formatting plugin in ANSI mode for all sources that I write new. Basically, I run AStyle every time before saving, and I do not spend a thought on formatting at all any more. It works just fine.
Usually I don't reformat existing sources though, even if they are not compliant (unless it happens by accident). This is because reformatting them will give really huge diffs in revision control even though nothing has been changed. Maybe that should be done on all sources nevertheless, but this is not my decision ;)
mandrav:
I personally use 4 spaces instead a single tab. You 're free to use a tab though. Just make sure it equals 4 spaces.
280Z28:
--- Quote from: thomas on December 15, 2005, 10:20:01 am ---Usually I don't reformat existing sources though, even if they are not compliant (unless it happens by accident). This is because reformatting them will give really huge diffs in revision control even though nothing has been changed. Maybe that should be done on all sources nevertheless, but this is not my decision ;)
--- End quote ---
Yes that is irritating. That's why I only changed lines right around what I was working on but maybe I shouldn't have done even that. :?
Navigation
[0] Message Index
Go to full version