keys.contains or values.contains is called where the map answers directly

tx0/kotlin:contains-on-map-viewstrictwarningperformance/algorithmicdepth fastperformance

What it finds

map.keys.contains(k) and k in map.keys go through the key view; containsKey(k) asks the map directly and reads better. For values there is containsValue.

From the rule's source, keys_contains.rs.

Example from the rule's tests
fun lookup(map: Map<String, Int>, key: String): Boolean {    if (map.keys.contains(key)) return truetx0 reports: the map answers this directly with containsKey    if (3 in map.values) return truetx0 reports: the map answers this directly with containsValue    return map.containsKey(key) || key in map}
Highlighted lines are the ones tx0 reports, with its message under each; the other lines are left alone.

Turn it on, off or suppress it

The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/kotlin:contains-on-map-view" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/kotlin:contains-on-map-view] reason="..."

tx0 explain tx0/kotlin:contains-on-map-view shows the same in the terminal. Found a false positive? Report it.