mirror of
https://github.com/zhukunpenglinyutong/jetbrains-cc-gui.git
synced 2026-08-28 16:31:27 +08:00
chore(checkstyle): enable NeedBraces rule
All bodies of if/else/while/for/do must now be wrapped in braces. The preceding commit fixed all 197 pre-existing violations, so checkstyleMain passes with zero errors. Removed the corresponding entry from the disabled-rules backlog comment.
This commit is contained in:
+8
-4
@@ -97,6 +97,14 @@
|
||||
<!-- Remove redundant modifiers (e.g. public on interface methods) -->
|
||||
<module name="RedundantModifier"/>
|
||||
|
||||
<!-- ===== Block Style ===== -->
|
||||
|
||||
<!-- Require braces around all if/else/while/for/do bodies. Guards against
|
||||
goto-fail-style bugs where a future edit silently slips outside the
|
||||
conditional. The 197 pre-existing single-line violations were fixed
|
||||
in the preceding commit. -->
|
||||
<module name="NeedBraces"/>
|
||||
|
||||
<!-- ===== Regexp ===== -->
|
||||
|
||||
<!--
|
||||
@@ -133,10 +141,6 @@
|
||||
- InnerTypeLastCheck (~628 violations)
|
||||
Reason: pure code-ordering preference, no functional benefit.
|
||||
|
||||
- NeedBraces (~197 violations)
|
||||
Reason: useful safety net but requires touching many single-line if statements.
|
||||
Consider re-enabling after a dedicated cleanup pass.
|
||||
|
||||
- NestedIfDepth / NestedTryDepth (~26 violations)
|
||||
Reason: real refactoring required, schedule separately.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user