Reports calls to MutableCollection.addAll / += where the argument is a call to Iterable.map/filter.

This code allocates an additional List object that can be saved by using mapTo/filterTo.

The quickfixes replaces the call with mapTo/filterTo.

例:


    coll1.addAll(coll2.map { transform(it) })
    coll1 += coll2.map { transform(it) }

クイックフィックス適用後:


    coll2.mapTo(coll1) { transform(it) }