diff --git a/docs/CODING_STYLE.md b/docs/CODING_STYLE.md index 09b74d35d8..54150e1ee7 100644 --- a/docs/CODING_STYLE.md +++ b/docs/CODING_STYLE.md @@ -69,6 +69,14 @@ layout: default ``` - Do not write `foo ()`, write `foo()`. +- `else` blocks should generally start on the same line as the closing `}`: + ```c + if (foobar) { + find(); + waldo(); + } else + dont_find_waldo(); + ``` ## Code Organization and Semantics