Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions analyzer-comments/java/leap/avoid_conditional_logic.md

This file was deleted.

3 changes: 3 additions & 0 deletions analyzer-comments/java/leap/avoid_if_statements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# avoid `if` statements

Consider converting the if statement(s) into a single expression using logical operators (`&&`, `||`) or ternary operators.
Copy link

@siebenschlaefer siebenschlaefer Apr 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe surround the "if" with backticks: `if`

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that, really appreciate it!

3 changes: 3 additions & 0 deletions analyzer-comments/java/leap/avoid_redundant_ternary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# avoid redundant ternary

Try returning the conditions directly instead of returning boolean literals (true and flase).
Copy link

@siebenschlaefer siebenschlaefer Apr 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: flase
also, consider surrounding keywords with backticks: `true` and `false`