-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于注解内常量的检查 #34
Comments
是的,我也发现这个问题了。 |
@shaonialife 提供个具体代码事例,最好是截图 |
Sorry , 刚测试发现 interface 内的常量可以,@interface 内的不行,怪我看走眼了 |
注解里面定义的变量不是public static final的,所以请使用小写驼峰形式 |
从我上面发的图片可以看到 @IntDef 里面引用了 UploadStatus 里面的值,而 @IntDef 括号里面只能填写常量,间接就说明了在注解 UploadStatus 里面定义的那三个值就是常量 |
这个是 public final 不是public static final @shaonialife |
@shaonialife 好的,确实是我们的问题,下一个版本中会修复掉。 |
已发布,问题已修复。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在 @interface 中写的 常量,本身默认含有 public static final 修饰,命名按照常量规范命名,但是规约插件检测为变量,提示 不符合 lowerCamelCase 命名规范
The text was updated successfully, but these errors were encountered: