forked from phoedos/pmd
More suppression tests; thanks to Ryan Gustafson for the patch!
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4894 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -76,6 +76,18 @@
|
||||
runTestFromString(TEST9, new FooRule(), rpt, SourceType.JAVA_15);
|
||||
assertEquals(1, rpt.size());
|
||||
}
|
||||
|
||||
public void testNoSuppressionBlank() throws Throwable {
|
||||
Report rpt = new Report();
|
||||
runTestFromString(TEST10, new FooRule(), rpt, SourceType.JAVA_15);
|
||||
assertEquals(2, rpt.size());
|
||||
}
|
||||
|
||||
public void testNoSuppressionSomethingElseS() throws Throwable {
|
||||
Report rpt = new Report();
|
||||
runTestFromString(TEST11, new FooRule(), rpt, SourceType.JAVA_15);
|
||||
assertEquals(2, rpt.size());
|
||||
}
|
||||
|
||||
private static final String TEST1 =
|
||||
"@SuppressWarnings(\"PMD\")" + PMD.EOL +
|
||||
@ -146,4 +158,21 @@
|
||||
" }" + PMD.EOL +
|
||||
"}";
|
||||
|
||||
private static final String TEST10 =
|
||||
"public class Bar {" + PMD.EOL +
|
||||
" int foo;" + PMD.EOL +
|
||||
" void bar() {" + PMD.EOL +
|
||||
" @SuppressWarnings(\"\") int foo;" + PMD.EOL +
|
||||
" }" + PMD.EOL +
|
||||
"}";
|
||||
|
||||
private static final String TEST11 =
|
||||
"public class Bar {" + PMD.EOL +
|
||||
" int foo;" + PMD.EOL +
|
||||
" void bar() {" + PMD.EOL +
|
||||
" @SuppressWarnings(\"SomethingElse\") int foo;" + PMD.EOL +
|
||||
" }" + PMD.EOL +
|
||||
"}";
|
||||
}
|
||||
|
||||
|
||||
|
@ -54,6 +54,7 @@
|
||||
</subsection>
|
||||
<subsection name="Contributors">
|
||||
<ul>
|
||||
<li>Ryan Gustafson - Patch to add more annotation suppression tests, patch to fix bug in AvoidDecimalLiteralsInBigDecimalConstructor, patch to add "ref" overrides to RuleSetFactory, patch to fix JDK 1.3 incompatibilities in PMD 2.0, patch to support classpaths with spaces in pmd.bat, patch to fix controversial/DefaultPackage XPath rule</li>
|
||||
<li>Lukas Theussl - Patch to bring Maven configuration files up to date</li>
|
||||
<li>Jason Bennett - Rewrite of annotation-based warning suppression to allow for rule-specific suppression, noticed useless line in XSLT scripts, fix for UnnecessaryLocalBeforeReturn, wrote NPathComplexity rule, patches to improve CyclomaticComplexity rule, Implemented: UseCollectionIsEmpty, NcssTypeCount, NcssMethodCount, NcssConstructor</li>
|
||||
<li>Brent Fisher - Fixed report backslash bug, SummaryHTML report improvements</li>
|
||||
@ -64,7 +65,6 @@
|
||||
<li>piair - Implemented StringBufferInstantiationWithChar, AvoidUsingOctalValues</li>
|
||||
<li>Christopher Eagan - Reported bug in VariableNamingConventions</li>
|
||||
<li><a href="http://www.livejournal.com/users/insac/">Fabio Insaccanebbia</a> - Improvement for UseArraysAsList, UnusedNullCheckInEquals, MisplacedNullCheck, UselessOperationOnImmutable, AvoidArrayLoops, UseArraysAsList, AvoidConstantsInterface, AvoidDecimalLiteralsInBigDecimalConstructor, ClassCastExceptionWithToArray, BigIntegerInstantiation</li>
|
||||
<li>Ryan Gustafson - Patch to fix bug in AvoidDecimalLiteralsInBigDecimalConstructor, patch to add "ref" overrides to RuleSetFactory, patch to fix JDK 1.3 incompatibilities in PMD 2.0, patch to support classpaths with spaces in pmd.bat, patch to fix controversial/DefaultPackage XPath rule</li>
|
||||
<li>Stefan Seidel - Reported JDK 1.5 parsing bug</li>
|
||||
<li>Aaron Optimizer Digulla - Tweaks to pmd.bat</li>
|
||||
<li>Peter Van de Voorde - Rewrote the 'create rule XML' functionality in the designer utility</li>
|
||||
|
Reference in New Issue
Block a user