Is there any way that I can force compiler, IDE or...
# getting-started
m
Is there any way that I can force compiler, IDE or any tool like detekt, klint to give error/warning when a method explicitly not defines the return type ?
Copy code
fun exampleMethod() = "SomeString" // want to have warning/error
fun exampleMethod(): String = "SomeString" // this should pass
c
you can enable the Kotlin public API mode, requiring an explicit return value on publicly exposed methods.
m
Ohh this looks promising let me have a look at it 🙂 Thanks a lot!
👍 1