简体   繁体   English

如果我未能为公共字段和方法提供JavaDoc描述/注释,如何让IntelliJ给我一个警告?

[英]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.

相关问题 如何使用特定的Annotation获取所有方法的javadoc,方法名称和包/类名? - How can I get the javadoc of all methods with a specific Annotation, with the method name and package/class name? Intellij:Javadoc 在 ctrl+b 后我看不到方法的描述,class 在 java 文档中 - Intellij: Javadoc I can't see description of the methods, class in java documentation after ctrl+b 重用字段或方法的名称和javadoc描述 - reuse of fields or methods for their names and for javadoc description 如何让IntelliJ为我创建一个“ .ipr”文件? - How do I get IntelliJ to create a “.ipr” file for me? 如何让数组方法为我提供正确的输出? - How do I get the array method to give me the correct output? 如何获取Java类的所有公共静态方法? - How do I get all public static methods of a class in Java? 为什么 IntelliJ IDEA 会警告此文件 javadoc 悬空? - Why does IntelliJ IDEA give a warning that this file javadoc is dangling? 如何在NetBeans的自动完成javadoc中显示自定义javadoc标记? - How do I get a custom javadoc tag to appear in the autocomplete javadoc in netbeans? 当无法找到IntelliJ时,如何使IntelliJ在Javadoc URLS末尾检查_或__? - How Can I get IntelliJ to check for _ or __ at the end of Javadoc URLS when it can't find them? 如何从Javadoc中排除已弃用的公共方法? - How to exclude deprecated public methods from Javadoc?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM