Inspectopedia
 
2024.3

Redundant safe navigation

Warning
New
Last modified: 03 December 2024

Reports the use of the safe navigation operator (&.) with a non-nil receiver, which can be omitted.

Use the Ignored receivers list to specify method calls used as receivers that should be ignored (for example, Foo#call or Foo::call for an instance or a singleton method respectively).

Example: