对于我的一个枚举类,我想使用非标准命名:
enum class MyEnum {
I_like_to_use,
This_strange_naming_here
}
IDE(和代码检查)正确地抱怨:
Enum entry name 'This_strange_naming_here' doesn't match regex '[A-Z]([A-Za-z\d]*|[A-Z_\d]*)'.
This inspection reports enum entry named that do not follow the recommended naming conventions.
但是,在这种情况下,我想主动禁止显示此警告。我尝试使用@Suppress("naming")
,但无济于事。