Eclipse - how to set javadoc warnings only to specific folders, not the whole project

爱⌒轻易说出口 提交于 2019-12-10 13:29:30

问题


Some of my colleagues lack discipline and not always write documentation of their classes(not always = never). I was trying to force them to write documentation by setting project warnings for missing comment javadocs. We got two source folders 'src' and 'tests' - obviously not all @Test methods needs documentation and this warning there is redundant. But now all undocumented tests got these annoying warnings, the project got hundreds of warnings and I'm afraid that some real dangerous warnings will be missed(because there are hundreds of useless ones).

How to set warnings only on the 'src' folder, and ignore the warnings on 'tests' folder?


回答1:


I'm afraid there is no setting to disable missing javadoc validation strictly for Test classes/methods. There even was a suggestion posted on Eclipse bugzilla here but eventually it came to an dead end.

The only, nonelegant way of solving this issue is by annotating those test methods with @SuppressWarnings("javadoc") annotation.



来源:https://stackoverflow.com/questions/8268165/eclipse-how-to-set-javadoc-warnings-only-to-specific-folders-not-the-whole-pr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!