Algorithm Common: add braces to single statements#4567
Conversation
|
I think this kind of cosmetic commits do more harm than good. The chance to introduce issues while merging code with other developments is basically 1, for no real benefit (AFAICT 0 bugs in the last 5 years were due to missing braces). IMHO this should be implemented as part of the PR checks, proposing fixes only for the modified files, like the clang-format ones. What is preventing this from working like that? |
|
+1 for adding this to the PR checks, although perhaps not so easy Well, actually, I think I could do it with uncrustify, could work similarly to clang-format. It might be possible to disable all formatting requirements and just enforce the braces. But would we want a second formatter to check the code? Personally, I don't have a real problem with merging this. If I forgot the braces and someone else fixes them, then I'll have to live with the merge collisions... :) |
Similarly to |
No description provided.