Inspectopedia
 
2024.3

Empty 'else' block

Warning
New
Last modified: 03 December 2024

Reports empty else blocks. While occasionally intentional, empty else blocks usually indicate coding errors and can make debugging difficult.

Use the Ignore 'else' blocks with comments checkbox to define whether else blocks containing only comments count.

Inspired by 'Ruby Style Guide'