Skip to content

Commit

Permalink
Fix rule code samples to be valid Kotlin code (#4969)
Browse files Browse the repository at this point in the history
  • Loading branch information
3flex committed Jun 19, 2022
1 parent 8b62ffc commit b06276a
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -26,13 +26,13 @@ import org.jetbrains.kotlin.types.typeUtil.supertypes
* Prefer the usage of the indexed access operator `[]` for map or list element access or insert methods.
*
* <noncompliant>
* val map = Map<String, String>()
* val map = mutableMapOf<String, String>()
* map.put("key", "value")
* val value = map.get("key")
* </noncompliant>
*
* <compliant>
* val map = Map<String, String>()
* val map = mutableMapOf<String, String>()
* map["key"] = "value"
* val value = map["key"]
* </compliant>
Expand Down

0 comments on commit b06276a

Please sign in to comment.