IDEADEV-2514

This commit is contained in:
Dmitry Jemerov
2005-09-22 21:56:40 +04:00
parent 413934f0e1
commit 9f6973e7ae
12 changed files with 135 additions and 0 deletions

View File

@@ -262,6 +262,9 @@ inspection.javadoc.method.problem.descriptor=Description is missing in {0} tag f
inspection.javadoc.method.problem.descriptor1=Description is missing in {0} tag.
inspection.javadoc.method.problem.descriptor2={0} tag description is missing.
inspection.javadoc.method.problem.descriptor3=Required tag {0} is missing for parameter {1}
inspection.javadoc.problem.duplicate.param=Duplicate @param tag for parameter ''{0}''
inspection.javadoc.problem.duplicate.throws=Duplicate @throws or @exception tag for exception ''{0}''
inspection.javadoc.problem.duplicate.tag=Duplicate @{0} tag
inspection.export.results.abstract=abstract
inspection.export.results.static=static

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>Foo.java</file>
<line>4</line>
<description>Duplicate @deprecated tag</description>
</problem>
</problems>

View File

@@ -0,0 +1,7 @@
/**
* Test.
* @deprecated You bet.
* @deprecated Gotcha.
*/
class Foo {
}

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>Foo.java</file>
<line>5</line>
<description>Duplicate @param tag for parameter 's'</description>
</problem>
</problems>

View File

@@ -0,0 +1,9 @@
class Test {
/**
* Test.
* @param s my string
* @param s another string
*/
void test(String s) {
}
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>Foo.java</file>
<line>5</line>
<description>Duplicate @return tag</description>
</problem>
</problems>

View File

@@ -0,0 +1,9 @@
class Test {
/**
* Test.
* @return my string
* @return another string
*/
String test() {
}
}

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>Foo.java</file>
<line>5</line>
<description>Duplicate @serial tag</description>
</problem>
</problems>

View File

@@ -0,0 +1,8 @@
class Test {
/**
* Test.
* @serial something
* @serial something else
*/
private int a;
}

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>Foo.java</file>
<line>5</line>
<description>Duplicate @throws tag for exception 'java.lang.Exception'</description>
</problem>
</problems>

View File

@@ -0,0 +1,9 @@
class Test {
/**
* Test.
* @throws java.lang.Exception in case of problems
* @exception java.lang.Exception in case of other problems
*/
void test() throws java.lang.Exception {
}
}

View File

@@ -0,0 +1,46 @@
package com.intellij.codeInspection;
import com.intellij.codeInspection.javaDoc.JavaDocInspection;
/**
* Created by IntelliJ IDEA.
* User: yole
* Date: 22.09.2005
* Time: 20:24:19
* To change this template use File | Settings | File Templates.
*/
public class JavaDocInspectionTest extends InspectionTestCase {
private JavaDocInspection myTool;
protected void setUp() throws Exception {
super.setUp();
myTool = new JavaDocInspection();
myTool.initialize(getManager());
}
private void doTest() throws Exception {
doTest("javaDocInspection/" + getTestName(false), myTool);
}
public void testDuplicateParam() throws Exception {
doTest();
}
public void testDuplicateReturn() throws Exception {
doTest();
}
// tests for duplicate class tags
public void testDuplicateDeprecated() throws Exception {
doTest();
}
// tests for duplicate field tags
public void testDuplicateSerial() throws Exception {
doTest();
}
public void testDuplicateThrows() throws Exception {
doTest();
}
}