[SCB-2567] enable checkstyle NeedBraces (#3069)

diff --git a/ci/checkstyle/checkstyle.xml b/ci/checkstyle/checkstyle.xml
index 1aecaa3..4ea168a 100644
--- a/ci/checkstyle/checkstyle.xml
+++ b/ci/checkstyle/checkstyle.xml
@@ -44,6 +44,11 @@
       <property name="allowLineBreaks" value="true"/>
       <property name="severity" value="error"/>
     </module>
+    <!-- Checks for braces around if and else blocks -->
+    <module name="NeedBraces">
+      <property name="severity" value="error"/>
+      <property name="tokens" value="LITERAL_IF, LITERAL_ELSE, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO"/>
+    </module>
     <module name="NoWhitespaceBefore">
       <!-- Checks that there is no whitespace before various unary operators.
            Linebreaks are allowed.