Skip to content

Commit

Permalink
Add checkstyle check and editor support for requiring if/else braces
Browse files Browse the repository at this point in the history
  • Loading branch information
williamrandolph committed Dec 7, 2023
1 parent 08b9142 commit 79d8245
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ max_line_length = 140
ij_java_class_count_to_use_import_on_demand = 999
ij_java_names_count_to_use_import_on_demand = 999
ij_java_imports_layout = *,|,com.**,|,org.**,|,java.**,javax.**,|,$*
ij_java_keep_simple_blocks_in_one_line = false

[*.json]
indent_size = 2
Expand Down
3 changes: 2 additions & 1 deletion .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions build-tools-internal/src/main/resources/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,7 @@
value="Do not negate boolean expressions with '!', but check explicitly with '== false' as it is more explicit"/>
</module>

<module name="NeedBraces" />

</module>
</module>

0 comments on commit 79d8245

Please sign in to comment.