'code review in check style in eclipse
I am reviewing my code with check style . this is waste plugin in this ide.
I don't know why my code always show missing javadoc comment.
even i am giving the proper comments.
please is there any way to review the code in proper way.
can i make my own rules.
update
every line is showing missing javadoc ...after putting comment also
public class MyTest {
/**
* integer Variable I
*/
public static int I = 10;
/**
* String Variable Name
*/
public static String NAME = "XYZ";
/**
* Constructor
*/
public MyTest() {
}
/**
* Main method
* @param args
*/
public static void main(String[] args) {
System.out.print(NAME+"\n"+I);
}
}
Solution 1:[1]
You get the warning because the javadoc comments are missing: Example
/**
* Gets the distance between tw points.
*/
double getDistance(Point a, Point b);
This comment is not complete because the params are not documented, but it is the minimal that checkstyle will accept ( in the default rules)
Same has to be done for class, sometimes for fields, too.
You can enable and disable specific checkstyle rules, but first try to write your code sucht that the default rules (sun checks) do not deliver warnings.
Solution 2:[2]
You need a comment above your class as well.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | AlexWien |
| Solution 2 | aqteifan |
