Uncrustify: Difference between revisions
(fixing and regularizing the formatting of the code) |
(parameter indenting) |
||
Line 16: | Line 16: | ||
Formatting tables legibly is an art and may not be handled well by a program. | Formatting tables legibly is an art and may not be handled well by a program. | ||
How should parameters be alligned? In declarations? In calls? | |||
- Below and inside open paren? Requires tabs followed by spaces (requires extra care when editing). Kernel style. Although uncrustify seems to be off by one column. | |||
- One tab in? In declarations, this is same as body indentation, confusing? |
Revision as of 09:44, 5 June 2013
Cleaning up the formatting is a good idea.
Doing it on a "flag day" is necessary.
It will create a break in history -- we need to mitigate this.
The process should be idempotent so we can regularly re-apply it.
The process should be incorporated into the makefiles so it is reliably reproduceable.
It is imaginable that it be done with some git hooks so only pretty code is checked in.
Linux kernel style should be the baseline. Some modifications might be worthwhile.
Hugh thinks that it is a mistake to remove all redundant braces. Sometimes they add clarity.
Formatting tables legibly is an art and may not be handled well by a program.
How should parameters be alligned? In declarations? In calls?
- Below and inside open paren? Requires tabs followed by spaces (requires extra care when editing). Kernel style. Although uncrustify seems to be off by one column.
- One tab in? In declarations, this is same as body indentation, confusing?