intellij-idea - 如何抑制有关命名约定的警告?
问题描述
对于我的枚举类之一,我想使用非标准命名:
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")
,但无济于事。
解决方案
推荐阅读
- python - 用户查看页面源代码时的 Flask 问题
- swift - 确定 Firebase 存储中图像的图像方向
- python - 根据 df 列中每个条目中的 numpy 数组的总和删除行
- python - Python:在谷歌云存储中将所有文件读取为 gcs_uri
- powershell - 脚本从 powershell ISE 工作,但不是从 powershell
- java - 进行中的重新平衡异常意外发生
- kubernetes - kubectl status.phase=运行返回错误结果
- javascript - 用 Express 为 Mongoose 编写端点函数的正确方法是什么?
- dart - 飞镖初学者需要帮助
- c# - 带有继承对象的 JsonConvert DeserializeObject