Skip to content

Commit

Permalink
docs/developers.txt: update coding style guide about braces after if/…
Browse files Browse the repository at this point in the history
…while/for/... even for a single line
  • Loading branch information
jimklimov committed Feb 28, 2023
1 parent 1b6c487 commit 008797e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/developers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,12 @@ if (condition) {
}
-------------------------------------------------------------------------------

NOTE: Earlier revisions of coding style might suggest avoiding braces if just
one line is added as condition/loop/etc. handling code. Current approach is to
welcome them even for single lines: on one hand, this confirms the intention
that only this line is the conditional code; on another, this minimizes the
context differences for later code comparisons, relocation, refactoring, etc.

Un-used variables and function arguments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit 008797e

Please sign in to comment.