Repository navigation
Conversation
|
I will start with one setting that I believe should be changed: When breaking lines, operators should be at the end of the line, and not the start of the next one, as it are now. IMO, this gives a clear indication that "this line has not ended yet, it continues". Some examples where the current setting that feel jarring to me: Lines 1134 to 1137 in 69910a2 liboni/api/liboni/drivers/ft600/onidriver_ft600.c Lines 672 to 673 in 69910a2 liboni/api/liboni/drivers/ft600/onidriver_ft600.c Lines 717 to 718 in 69910a2 (this last one, with only the lvalue in the line, stands specially out) I would consider increasing the maximum column width from 80 to 100. While 80 has been the standard since the 90's, many projects seems to be increasing the limit nowadays. 100 seems to be the sweet spot to look nice on widescreens without having lines too long. Alternatively, or in addition, we should play a bit with the penalties. Besides that, the format seems nice to me. We could maybe discuss if opening brackets should be in a new line for some more kinds of statement, or is it good as it is. |
This PR is intended to be a review of the current
.clang-formatsettings, to check that it is what we want or needs tweaking.We should look at the files, maybe not only at the diff but also whole, and check if there is anything in the format we would like to change.
This might be an iterative process, so we can do multiple passes of this here and then squash the commits into a single formatting pass one.