Inspectopedia
 
2024.3

Incorrect parentheses in method definition

Info
New
Last modified: 03 December 2024

Reports method definitions with the incorrect parentheses style. Parentheses are expected in method definitions with parameters, opposite to method definitions without parameters.

Example:

Quick-fixes are available to remove the parentheses or add them respectively. After the quick-fixes are applied, the result looks like this:

Inspired by 'RuboCop'