@@ -12,6 +12,20 @@ | |||
<name>Avoid if without using brace</name> | |||
<configKey>rulesets/extensions.xml/AvoidIfWithoutBrace</configKey> | |||
<category name="Usability"/> | |||
<description>éviter les if sans crochet.</description> | |||
</rule> | |||
<description></description> | |||
</rule> | |||
<rule key="PreventUseOfEmptyClass" priority="MAJOR"> | |||
<name><![CDATA[Prevent use of EmptyClass]]></name> | |||
<configKey><![CDATA[net.sourceforge.pmd.rules.XPathRule]]></configKey> | |||
<category name="Maintainability"/> | |||
<description></description> | |||
<param key="xpath" type="s"> | |||
<description><![CDATA[XPath expressions.]]></description> | |||
<defaultValue>//VariableDeclarator[../Type/ReferenceType/ClassOrInterfaceType[@Image='EmptyClass']]</defaultValue> | |||
</param> | |||
<param key="message" type="s"> | |||
<description><![CDATA[Message to display when a violation occurs.]]></description> | |||
<defaultValue>Prevent use of EmptyClass class</defaultValue> | |||
</param> | |||
</rule> | |||
</rules> |
@@ -1891,6 +1891,21 @@ | |||
<plugin><![CDATA[findbugs]]></plugin> | |||
<level><![CDATA[ERROR]]></level> | |||
</active-rule> | |||
<active-rule> | |||
<key><![CDATA[PreventUseOfEmptyClass]]></key> | |||
<plugin><![CDATA[pmd]]></plugin> | |||
<level><![CDATA[INFO]]></level> | |||
<params> | |||
<param> | |||
<key><![CDATA[xpath]]></key> | |||
<value><![CDATA[//VariableDeclarator[../Type/ReferenceType/ClassOrInterfaceType[@Image='EmptyClass']]]]></value> | |||
</param> | |||
<param> | |||
<key><![CDATA[message]]></key> | |||
<value><![CDATA[Prevent use of EmptyClass class]]></value> | |||
</param> | |||
</params> | |||
</active-rule> | |||
</active-rules> | |||
<alerts> | |||
<alert> |
@@ -440,6 +440,9 @@ | |||
<tr> | |||
<td><a href="rules/check_rules_extensions.html">rules/check_rules_extensions</a></td> | |||
</tr> | |||
<tr> | |||
<td><a href="rules/pmd_xpath_rule_extension.html">rules/pmd_xpath_rule_extension</a></td> | |||
</tr> | |||
<tr> | |||
<td><a href="rules/copy_a_provided_profile_and_modify_a_rule_param.html">rules/copy_a_provided_profile_and_modify_a_rule_param</a> | |||
</td> |
@@ -0,0 +1,47 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |||
<head profile="http://selenium-ide.openqa.org/profiles/test-case"> | |||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |||
<link rel="selenium.base" href="" /> | |||
<title>pmd_xpath_rule_extension</title> | |||
</head> | |||
<body> | |||
<table cellpadding="1" cellspacing="1" border="1"> | |||
<thead> | |||
<tr><td rowspan="1" colspan="3">pmd_xpath_rule_extension</td></tr> | |||
</thead><tbody> | |||
<tr> | |||
<td>store</td> | |||
<td>Methods Count Check</td> | |||
<td>CHECKSTYLE_EXTENSION</td> | |||
</tr> | |||
<tr> | |||
<td>store</td> | |||
<td>org.sonar.tests:reference</td> | |||
<td>PROJECT_ID</td> | |||
</tr> | |||
<tr> | |||
<td>store</td> | |||
<td>Prevent use of EmptyClass</td> | |||
<td>RULE_TITLE</td> | |||
</tr> | |||
<tr> | |||
<td>open</td> | |||
<td>/drilldown/violations/${PROJECT_ID}</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>clickAndWait</td> | |||
<td>link=${RULE_TITLE}</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>assertTextPresent</td> | |||
<td>InterfaceWithConstants</td> | |||
<td></td> | |||
</tr> | |||
</tbody></table> | |||
</body> | |||
</html> |