[mythtv] [mythtv-commits] mythtv commit: r18454 by stuartm

Anduin Withers awithers at anduin.com
Sun Sep 28 19:17:57 UTC 2008


> People tend to copy what they see,
> regardless of what the standards might say, if we want future patches to
> stick to those rules then we'll get much further leading by example.

Copying what you see in a file is the best coding standard, I don't think we should discourage that.

Our own coding standard encourages disobedience. This is a reasonable interpretation for anything that starts with "These standards are mostly voluntary" followed by pointing out that a lot of the code doesn't actually look this way (not even an "all new code will look this way" to encourage folks). All of this ending in a single "hard and fast rule"... about tabs.

Soft words abound in the coding standard: m_, only "usually". Most of the others are "should" which isn't "shall" or "must" and is further weakened by it all being voluntary (except the blessed anti-tab rule).

To not ignore whitespace for a moment, not a single prohibition against trailing spaces (though I'd quickly grant that people should just know this). Whitespace only changes may not be actual evil but the crowd they run with tends to be.

Personally I like it wishy-washy and suspect most people really do (even if they may not realize it). I'm somewhat tempted to look for the last commit that had "^public:" or used "struct name {\n".

This ignores internal inconsistencies: We avoid Cisms while using static non-members (deprecated at least as far back as drafts for what became the 98 international standard). The comment rules allowing for "compact" technically permit new commits to contain things like "// C++ headers".

Personally, I like being able to find enough examples of parenthesis line continuations not really following the "if you indent past the last opening parenthesis of the previous line, you'll be in good shape" that I feel less guilty when ignoring it.

And yes, I understand I hardly do anything, I'll have my addiction to participating in these threads looked at.

--
Anduin Withers 



More information about the mythtv-dev mailing list