An inline function takes no function and has no reified type parameter

tx0/kotlin:inline-without-function-parameterstrictwarningmaintainability/designdepth fastsmell

What it finds

Inlining pays off when it removes the allocation of lambdas passed to the function, or when it lets a type parameter be reified. Without either, inline copies the body into every caller and grows the code for no gain; the compiler warns about it.

From the rule's source, inline_without_lambda.rs.

Example from the rule's tests
inline fun square(x: Int) = x * xtx0 reports: square is inline without a function parameterinline fun <reified T> typeName() = T::class.simpleNameinline fun repeatTwice(block: () -> Unit) { block(); block() }inline fun String.applyTo(block: String.() -> Unit) = block()
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:inline-without-function-parameter" = "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:inline-without-function-parameter] reason="..."

tx0 explain tx0/kotlin:inline-without-function-parameter shows the same in the terminal. Found a false positive? Report it.