comment should start with two asterisks
1
/* * @description Foo */ public class Foo { }
public test class does not need comment
0
@isTest public class Foo { }
public class should have comment
1
public class Foo { }
global class should have comment
1
global class Foo { }
private class does not need comment
0
private class Foo { }
private class should have comment if specified
true
1
private class Foo { }
class comment should have description
1
3
Missing ApexDoc @description
/** */ public class Foo { }
correct class comment
0
/** * @description Foo */ public class Foo { }
correct class comment with annotation
0
/** * @description Foo */ @Deprecated public class Foo { }
public interface should have comment
1
public interface Foo { }
global interface should have comment
1
global interface Foo { }
private interface does not need comment
0
private interface Foo { }
private interface should have comment if specified
true
1
private interface Foo { }
interface comment should have description
1
/** */ public interface Foo { }
correct interface comment
0
/** * @description Foo */ public interface Foo { }
correct interface comment with annotation
0
/** * @description Foo */ @Deprecated public interface Foo { }
public method in interface should have comment
1
5
Missing ApexDoc comment
/** * @description My Interface */ public interface MyInterface { void func(); }
public method should have comment
1
/** * @description Foo */ public class Foo { public void bar() { } }
global method should have comment
1
/** * @description Foo */ public class Foo { global void bar() { } }
private method does not need comment
0
/** * @description Foo */ public class Foo { private void bar() { } }
private method should have comment if specified
true
1
/** * @description Foo */ public class Foo { private void bar() { } }
protected method does not need comment
0
/** * @description Foo */ public class Foo { protected void bar() { } }
protected method should have comment if specified
true
1
/** * @description Foo */ public class Foo { protected void bar() { } }
public override method does not need comment
0
/** * @description Foo */ public class Foo { public override void bar() { } }
method comment should have description
1
/** * @description Foo */ public class Foo { /** */ public void bar() { } }
non-void method comment should have return
1
/** * @description Foo */ public class Foo { /** * @description Bar */ public Object bar() { return null; } }
constructor comment does not need return
0
/** * @description Foo */ public class Foo { /** * @description Foo */ public Foo() { } }
method with param comment should have param
1
/** * @description Foo */ public class Foo { /** * @description Bar */ public void bar(String foo) { } }
params should match method
1
/** * @description Foo */ public class Foo { /** * @description Bar * @param foo1 Foo */ public void bar(String foo) { } }
correct void method comment
0
/** * @description Foo */ public class Foo { /** * @description Bar */ public void bar() { } }
correct non-void method comment
0
/** * @description Foo */ public class Foo { /** * @description Bar * @return Bar */ public Object bar() { return null; } }
correct method with params comment
0
/** * @description Foo */ public class Foo { /** * @description Bar * @param foo1 Foo1 * @param foo2 Foo2 */ public void bar(String foo1, String foo2) { return null; } }
correct method comment with annotation
0
/** * @description Foo */ public class Foo { /** * @description Bar */ @Deprecated public void bar() { } }
public property should have comment
1
/** * @description Foo */ public class Foo { public Object Bar { get; set; } }
global property should have comment
1
/** * @description Foo */ public class Foo { global Object Bar { get; set; } }
private property does not need a comment
0
/** * @description Foo */ public class Foo { private Object Bar { get; set; } }
private property should have a comment if specified
true
1
/** * @description Foo */ public class Foo { private Object Bar { get; set; } }
protected property does not need a comment
0
/** * @description Foo */ public class Foo { protected Object Bar { get; set; } }
protected property should have a comment if specified
true
1
/** * @description Foo */ public class Foo { protected Object Bar { get; set; } }
property comment should have description
1
/** * @description Foo */ public class Foo { public Object Bar { get; set; } }
correct property comment
0
/** * @description Foo */ public class Foo { /** * @description Bar */ public Object Bar { get; set; } }
correct property comment with annotation
0
/** * @description Foo */ public class Foo { /** * @description Bar */ @Deprecated public Object Bar { get; set; } }
#1783 correct comments for constructor and inner class
0
/** * @description Foo */ public class Foo {

/** * @description Foo */ public Foo() { }

/** * @description Bar */ public class Bar { } }
#1783 correct comments for constructor and inner class - false negative
1
12
/** * @description Foo */ public class Foo {

/** * @description Foo */ public Foo() { }

public class Bar { } }
#3566 [apex] ApexDoc: Verify use of reportMissingDescription, negative test unspecified/default
2
/** * No at-description tag provided. */ public class Foo {

/** * No at-description tag provided. */ public Foo() { } }
#3566 [apex] ApexDoc: Verify use of reportMissingDescription, negative test specified
true
2
/** * No at-description tag provided. */ public class Foo {

/** * No at-description tag provided. */ public Foo() { } }
#3566 [apex] ApexDoc: Verify use of reportMissingDescription, positive test
false
0
/** * No at-description tag provided. */ public class Foo {

/** * No at-description tag provided. */ public Foo() { } }
property should have comment
true
1
5
/** * @description Foo */ public class Foo { global Object Bar { get; set; } }
property with missing description
false
1
8
/** * @description Foo */ public class Foo { /** * the property bar */ global Object Bar { get; set; } }
property does not need comment
false
0
/** * @description Foo */ public class Foo { global Object Bar { get; set; } }
No comment required for static initializer blocks
0
/** * @description My Class */ public class MyClass { static { Test = 1; } }
Misplaced formal comment for static initializer blocks
0
/** * @description My Class */ public class MyClass { /** * Missing description... but that's no problem. Fields are not considered (yet) by ApexDoc. **/ public static Integer Test;

static { Test = 1; } }
[apex] ApexDoc false-positive for the first method of an annotated Apex class #4774
0
/** * @description : rest service **/ @RestResource(urlMapping='/api/v1/get/*') global without sharing class TestService { /** * @description Bar */ public void bar() { return; } }