For my application written in Kotlin I use backticked method names for tests, like this:
fun `API login error - don't save token or user`() {
It works, the tests compile and work without a problem, but Lint in Android Studio is marking those methods as error with message Identifier not allowed in Android
.
Is there any way to suppress this so that the Lint check passes without errors and it's not marked with red underline in Android Studio?
Based on wnc_21 answer I found that it can be disabled for a specific scope, in my case it's only used in tests so there's that.
I am not sure if you can do it in code, but you can at least disable it in the IDE. Go to "File | Settings | Editor | Inspections | Illegal Android Identifier" and disable this inspection.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With