Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to suppress warnings regarding naming conventions?

For one of my enum classes I'd like to use non-standard naming:

enum class MyEnum {
    I_like_to_use,
    This_strange_naming_here
}

The IDE (and code inspection) rightfully complains with:

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.

However in this case, I would like to actively suppress this warning. I tried with @Suppress("naming"), but to no avail.

like image 860
Tobias Hermann Avatar asked Jan 02 '23 02:01

Tobias Hermann


1 Answers

@Suppress("EnumEntryName") use these

like image 123
Vinay Kumar Avatar answered Jan 04 '23 17:01

Vinay Kumar