Kotlin

The Kotlin badge, lettered “Island Garrison · Concise · Null safe” round its band
Files
.kt .kts
Formats as
Ur
Lints
Every rule that reads its code
In ur.toml
[format.kotlin]

Formatted

Cart.kt, as written
// What a cart costs.
data class Item(val name:String,val price:Int,val quantity:Int)
fun subtotal(items:List<Item>):Int{return items.sumOf{it.price*it.quantity}}
fun label(item:Item)=item.name+" x"+item.quantity
ur format --style ur Cart.kt
// What a cart costs.
data class Item(val name:String, val price:Int, val quantity:Int)
fun subtotal(items:List<Item>):Int{return items.sumOf{it.price*it.quantity}}
fun label(item:Item)=item.name+" x"+item.quantity

Try it in the playground →

Versions

Ur reads Kotlin as the profiles below name it. Name the versions a project targets in target; without it, Ur reads kotlin-2.4.

ProfileDialect
kotlin-1.9Kotlinc
kotlin-2.0Kotlinc
kotlin-2.1Kotlinc
kotlin-2.2Kotlinc
kotlin-2.3Kotlinc
kotlin-2.4Kotlinc