Inspectopedia 2024.3 Help

Control flow issues

'case' statement without 'else' block   New in this release

Reports case statements without else blocks.

'unless' statement with 'else'   New in this release

Reports unless statements used with else.

Incorrect context for jump statement   New in this release

Reports the incorrect use of control flow jump statements, such as return, retry, redo, break, and continue.

Negative condition in control flow statement   New in this release

Reports control flow statements with negative conditions.

Nested ternary operator   New in this release

Reports nested ternary operators.

Simplifiable 'if' statement   New in this release

Reports if statements that can be replaced with case statements.

Unconventional 'for' loop   New in this release

Reports usages of for loops.

Last modified: 11 September 2024