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?
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.