Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure braces are always added for blocks
Code such as `if (foo) foo++;` may seem safe at first but when nested among other code, especially other conditionals, or complex expressions, it can become very difficult to scan, leading to misinterpretation of the code, bugs when editing, etc. Ensuring consistent use of braces for blocks avoids unintended changes in behaviour when adding additional statements to the block as well as encouraging clearer formatting that makes the code easier to scan. Seeing clusters of braces also serves as an indication to developers that code complexity may be increasing and is something that should be addressed.
- Loading branch information