[rkward-devel] indentation conventions

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Thu Dec 18 18:26:18 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Thu, 18 Dec 2014 15:45:16 +0100
meik michalke <Meik.Michalke at uni-duesseldorf.de> wrote:
> Am Donnerstag, 18. Dezember 2014, 14:27:30 schrieb Thomas
> Friedrichsmeier:
> > For KDE, different projects use different styles, already (and tabs
> > vs. space are not the only style-question, of course).
> 
> yes, i took this particular one because there seems to be a broad
> consensus among many coding conventions to not using tabs.
> 
> > Importantly, git blame will stop on such changes, even if the code
> > is otherwise untouched.
> 
> there's an option -w to ignore whitespace changes, so blame would
> still work.

Ah, good to know.

> it'd even be possible to commit these changes in a way
> that they "look" as if they were always there:
> http://stackoverflow.com/questions/3945382/git-commit-that-doesnt-override-original-authors-in-git-blame

That's using an evil rewrite of history, though.

> i'm ok with keeping things as they are, though.

Yes, I'd say it's not worth the trouble (for the C++-code; again, for
R code, the answer may be different). My impression is that nowadays the
holy war between tabs and spaces has cooled down, considerably. Probably
because modern editors are both, smart enough to allow indenting with
four spaces at a single key-press, _and_ to distinguish tabs and spaces,
visually.

I do confess there are some instances of mis-used tabs in RKWard,
though, i.e. to align end-of-line comments, which is simply wrong. I
never cared enough to figure out, how to replace those.

Again, though, _if_ we were to change tabs to spaces, there would be
more style questions to take care of at the same time. Things like
{} on the same line as if/else, or on different lines, spaces inside
and outside parentheses, etc. Not sure, if git blame -w could handle
all of these...

Regards
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJUkxxPAAoJEDkVkd8YWMu2j9cQAKZocGNZ4KOqBdxhXxMVmyKW
FdgVtcLFT8USq4dqYzoVroDVE29dmBwOR9m5OUF9xa8YZnkGhVN4VItsFuPGR6uA
ZdkhonZr/8d8iCFH7eblGWtQsTlCl47Q5I3SkMdfU8IFTgfm5mmGgc+qrf2yh/yi
kBDAp3mc20umVNVTJfZmc0DuUBvmt2NcjVT4lqFTZjf+oz6wZKx/mMFpPd6eBDfE
MtG0ATla5s+TBBEh6easHBhIldiE3Uaq6xTz9gxGuWhD0OTzTBnax1ec0RcAmfvW
/rjsfSBxotxD9xNyIRcHLcWO9BAxGgRl0m0DCXfemChko7MPXM8E+KnzyiFKS8m4
ZZp7hYcAN0bPdfHX1dqnMBawLMJ5+a1WwE/QfxAWccxxtkGAL5tRgTURiMqrvzAF
fH5QE8ZjTMY4bN3u+hyoKTrMKJsY6PuXPLXYFbXFUysrjM+R2xeyVxrCJ/mOQJvp
1o1QWyoYOTedo4ekrMl6FhJMH1kn9MpRUoRI96oXu2JReXFONC3cS8dK/nFQz6v7
Qw+jwOJlkOq+jGAcV6a+lzMVEXzs+1EPPTR3KCUPpwS4MwRUSD1fPRXbwt8BO2k0
UnxoSKW9nGZh7Z7VfqHHQHvr+Gwc/+o86oDrpqMdeMjOvcbT0oy1ea6BWXQ5IODD
5Q32045BKj56HqwzeYD0
=zRFi
-----END PGP SIGNATURE-----


More information about the Rkward-devel mailing list