Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 209
Kiril Kirilov Avatar asked Nov 25 '11 11:11

Kiril Kirilov


People also ask

How do I write Javadoc comments in Eclipse?

Shift-Alt-J is a useful keyboard shortcut in Eclipse for creating Javadoc comment templates.

Which is an effective way to generate Javadoc HTML files for an Eclipse project?

Step 1 − Open eclipse, select the option Project →Generate Javadoc. Step 2 − Select the javadoc.exe file from the bin folder of java installation directory, select the destination folder for the generated java doc and select Next. finish button.

Where is Javadoc located eclipse?

Typically, it is located under JAVA_HOME's bin directory. For example, C:\Program Files\Java\jdk1. 7.0_21\bin\javadoc.exe, on Windows platform. Select the project and packages for which you want to generate Javadoc.


1 Answers

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.

like image 78
Funky coder Avatar answered Sep 19 '22 18:09

Funky coder