[Dune] [#2] Common code-formatting
Dune
dune at dune-project.org
Wed Sep 30 14:40:29 CEST 2009
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#2 - Common code-formatting
User who did this - Carsten Gräser (Carsten)
----------
You're right rule 5 is about the width. Rule 6 and 7 also imply add exactly one indentation to the statement in non-block if/for/while/do. Perhaps there are more things I still miss. That's why I formulated it more general.
The rules are not meant to describe the style but how to handle files if we don't want to reformat all of them to one single style at once. But I see that they mix both.
Regarding the style itself we might also fix a little more than just 'no tabs, fixed number of spaces indent per file'. So more suggestions:
Indent...
1. ...the interior of blocks.
2. ...single statements after if/else/for/while/do/try/catch.
3. ...class content (public/...).
4. ...class members within a public/private/... block.
5. ...namespace content.
6. ...case blocks.
7. ...broken lines.
8. Don't indent lines opening/closing a block (brace lines)
9. Use one indentations level per indent only. (Perhaps with exceptions, especially regarding 7.)
If one looks at the code everything besides 3,5, and 6 seems to be consensus. 5 is also very common. Regarding 3 and 6 I'm not so sure.
----------
More information can be found at the following URL:
http://www.dune-project.org/flyspray/index.php?do=details&task_id=2#comment1135
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
More information about the Dune
mailing list