How do I suppress the new compiler warning "Name c...
# announcements
p
How do I suppress the new compiler warning "Name contains characters which can cause problems on Windows"? It doesn't show in IntelliJ, only in the Gradle build.
a
You can suppress it with
@Suppress("DANGEROUS_CHARACTERS")
on the function declaration. By the way, can you please share why do you want to suppress it? As I understand, we will turn it into an error at some point. Corresponding issue: https://youtrack.jetbrains.com/issue/KT-17438
p
I'm a big fan of using sentences as (junit) test method names, and sometimes I want to have quotes in them. something like:
Copy code
@Test
fun `state should be "on"`() { ... }
a
I see. Maybe you can just avoid using the symbols ?*"|%, so the program won't crash on Windows.
p
I can if I have to. Is there no way to lift this requirement? I don't use Windows.