[英]How do I get IntelliJ to give me a warning if I have failed to provide JavaDoc description/annotation for public fields and methods?
Eclipse is able to provide warnings if Javadoc has been unfulfilled for a particular method or field. 如果Javadoc未满足特定方法或字段,则Eclipse能够提供警告。 These fields/methods can be grouped by scope (public, protected, etc).
这些字段/方法可以按范围(公共,受保护等)进行分组。 I have found this very useful indeed when preparing my software for submission for university or whatever.
在准备我的软件提交大学或其他什么时,我发现这非常有用。
Is this not possible in IntelliJ? 这在IntelliJ中是不可能的吗?
Note that I am aware that you can hit "/**" just before a method in IntelliJ and it will fill it out. 请注意,我知道你可以在IntelliJ中的方法之前点击“/ **”,它会填满它。 This isn't exactly what I'm after.
这不完全是我追求的。
Also note that I'm using IntelliJ 13.01 Community Edition. 另请注意,我正在使用IntelliJ 13.01社区版。
For older versions of IntelliJ: Preferences > Inspections > JavaDoc issues > Declaration has JavaDoc problems 对于旧版本的IntelliJ:首选项>检查> JavaDoc问题>声明存在JavaDoc问题
For newer versions of IntelliJ: File > Settings... > Editor > Inspections > Java > JavaDoc issues > Declaration has JavaDoc problems 对于较新版本的IntelliJ:文件>设置...>编辑器>检查> Java> JavaDoc问题>声明有JavaDoc问题
Make sure to move "scope" slider to desired level of visibility for packages, classes, methods, fields and inner classes, by default it is set to "none". 确保将“范围”滑块移动到包,类,方法,字段和内部类的所需可见性级别,默认情况下将其设置为“无”。 You can also set "severity" level.
您还可以设置“严重性”级别。
In addition to continuous monitoring, you can also invoke inspections on demand with Cmd-Option-Shift-I, and enforce inspections prior to VCS commits(although it does not prevent you from committing your code with command line). 除了连续监视之外,您还可以使用Cmd-Option-Shift-I按需调用检查,并在VCS提交之前强制执行检查(尽管它不会阻止您使用命令行提交代码)。 You can also create specific inspection profiles, one for the university submissions, and another for your side projects, for example.
例如,您还可以创建特定的检查配置文件,一个用于大学提交,另一个用于您的辅助项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.