Inspectopedia Help

'then' in multiline 'if'/'unless' block

Reports redundant then keywords in multiline if/unless blocks.

Example:

# Bad practice if x > y then x = y end

A quick-fix is available to remove the then keyword.

# Good practice if x > y x = y end

Inspired by 'RuboCop'.

Inspection Details

Available in:

Qodana for Ruby 2023.3, RubyMine 2023.3

Plugin:

Ruby, 233.SNAPSHOT

Last modified: 13 July 2023