View Javadoc
1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.lang.java.rule.strings;
5   
6   import net.sourceforge.pmd.testframework.SimpleAggregatorTst;
7   
8   public class StringsRulesTest extends SimpleAggregatorTst {
9   
10      private static final String RULESET = "java-strings";
11  
12      @Override
13      public void setUp() {
14          addRule(RULESET, "AppendCharacterWithChar");
15          addRule(RULESET, "AvoidStringBufferField");
16          addRule(RULESET, "ConsecutiveAppendsShouldReuse");
17          addRule(RULESET, "ConsecutiveLiteralAppends");
18          addRule(RULESET, "InefficientEmptyStringCheck");
19          addRule(RULESET, "InefficientStringBuffering");
20          addRule(RULESET, "InsufficientStringBufferDeclaration");
21          addRule(RULESET, "StringBufferInstantiationWithChar");
22          addRule(RULESET, "StringInstantiation");
23          addRule(RULESET, "StringToString");
24          addRule(RULESET, "UnnecessaryCaseChange");
25          addRule(RULESET, "UseEqualsToCompareStrings");
26          addRule(RULESET, "UseIndexOfChar");
27          addRule(RULESET, "UselessStringValueOf");
28          addRule(RULESET, "UseStringBufferLength");
29      }
30  }