Reports collection.collect(f).headOption and suggests replacing it with collection.collectFirst(f) if possible.
collection.collect(f).headOption
collection.collectFirst(f)
Example:
val x: Set[Int] x.collect(f).headOption
After the quick-fix is applied:
val x: Set[Int] x.collectFirst(f)