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.

Examples:

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

By default bundled with:

IntelliJ IDEA 2024.1, Qodana for JVM 2024.1,

Can be installed with plugin:

Kotlin, 241.16690-IJ

Last modified: 29 April 2024