Inspectopedia Help

Probable bugs

'super' call with no superclass defined  

Reports super calls outside of methods or in classes that have no superclass defined.

Assignment expression in conditional  

Reports usages of assignment expressions in conditionals.

Duplicate key in hash  

Reports duplicate keys in hashes, method definitions, and calls.

Dynamic constant assignment  

Reports dynamic constant assignment.

Empty 'else' block  

Reports empty else blocks.

Empty 'rescue' block  

Reports empty rescue blocks.

Expression substitution in single-quoted string  

Reports expression substitutions #{...} in single-quoted strings.

Incorrect 'Hash[...]' call  

Reports improperly constructed Hash[...] calls.

Incorrect call argument count  

Reports method calls where: The number of arguments passed to the method doesn't match the number of parameters A required block is missing.

Invalid call to protected/private method  

Reports invalid calls to protected/private methods.

Mismatched argument type  

Reports method and yield calls with arguments whose inferred types don't match the parameter's expected type.

Mismatched constant type  

Reports constant assignments whose inferred types don't match the constant's expected type.

Mismatched global variable type  

Reports global variable assignments whose inferred types don't match the global variable's expected type.

Mismatched parameter type  

Reports default method and block parameter assignments whose inferred types don't match the parameter's expected type.

Mismatched return type  

Reports method and block return values whose inferred types don't match the method's expected return type.

Mismatched variable type  

Reports instance and class variable assignments whose inferred types don't match the variable's expected type.

Unbalanced brackets  

Reports blocks of code with unbalanced brackets.

Unexpected argument in method call  

Reports unexpected parameter values in method calls.

Unresolved reference  

Reports references in the code that cannot be resolved to any declaration (for example, a method reference or a constant reference).

Last modified: 18 June 2024