TODO() is called, which throws NotImplementedError when the code runs
What it finds
TODO() marks code that is not written yet and throws NotImplementedError when reached. Left in code that runs, it fails at run time where the compiler said nothing.
From the rule's source, todo_call.rs.
fun later(): Int = TODO()tx0 reports: TODO() throws NotImplementedError fun soon(): Int { TODO("write it")tx0 reports: TODO() throws} Turn it on, off or suppress it
The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/kotlin:todo-call" = "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:todo-call] reason="..."tx0 explain tx0/kotlin:todo-call shows the same in the terminal. Found a false positive? Report it.