Inspectopedia Help

Non-canonical modifier order

Reports modifiers that do not follow the order recommended by the style guide.

Sort modifiers quick-fix can be used to amend the code automatically.


private inline fun correctOrder(f: () -> Unit) {} // <== Ok infix private fun Int.wrongOrder(expr: Int) {} // <== wrong order, quick-fix amends the modifiers to "private infix"

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Kotlin, @snapshot@

Last modified: 13 July 2023