Inspectopedia Help

Code style issues

Array of string literals instead of '%w'  

Reports arrays of string literals that can be replaced with %w.

Block used instead of method reference  

Reports blocks that can be replaced with method references.

Class variable usage  

Reports the use of class variables.

Complex call chain  

Reports chained calls that can be simplified with the safe navigation operator (&.).

Conditional expression with parentheses  

Reports conditional expressions with parentheses inside if, elsif, unless, while, and until statements.

Hash with strings as keys  

Reports hashes with strings as keys.

Incorrect parentheses in method definition  

Reports method definitions with the incorrect parentheses style.

Interpolated variable without braces  

Reports interpolated variables (instance or global) without braces in expression substitutions.

Legacy hash syntax  

Reports hashes which use the hash rocket style that can be converted to the ruby 1.9+ style.

Redundant parentheses in no-arg method call  

Reports no-arg method calls with parentheses.

Unnecessary use of double quotes in string  

Reports double-quoted strings that can be converted to single-quoted.

Whitespace before parentheses in method call  

Reports method calls (including yield) with whitespace before its parentheses.

Last modified: 18 June 2024