Reports collection.collect(f).headOption and suggests replacing it with collection.collectFirst(f) if possible.

Example:


  val x: Set[Int]
  x.collect(f).headOption

After the quick-fix is applied:


  val x: Set[Int]
  x.collectFirst(f)