diff --git a/pom.xml b/pom.xml
index 5eff210b0..8cb6f2f8d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -888,13 +888,13 @@
jdk-system-out
+
+ **/Main.class
+
**/GeneratedJavaLexer.class
**/JavadocParser.class
- **/Main.class
**/Input*
- **/CompareTreesWithComments.class
- **/ConfigurationBuilder.class
diff --git a/src/it/java/com/google/checkstyle/test/base/ConfigurationBuilder.java b/src/it/java/com/google/checkstyle/test/base/ConfigurationBuilder.java
index 1b5d2f02f..2eff4bad2 100644
--- a/src/it/java/com/google/checkstyle/test/base/ConfigurationBuilder.java
+++ b/src/it/java/com/google/checkstyle/test/base/ConfigurationBuilder.java
@@ -50,24 +50,16 @@ public class ConfigurationBuilder extends BaseCheckTestSupport {
private final Pattern warnPattern = CommonUtils
.createPattern(".*[ ]*//[ ]*warn[ ]*|/[*]warn[*]/");
- public ConfigurationBuilder(File aRoot) {
+ public ConfigurationBuilder(File aRoot) throws CheckstyleException {
root = aRoot;
configuration = getConfigurationFromXML(XML_NAME, System.getProperties());
listFiles(files, root, "java");
}
private static Configuration getConfigurationFromXML(String aConfigName,
- Properties aProps) {
- try {
- return ConfigurationLoader.loadConfiguration(aConfigName,
- new PropertiesExpander(aProps));
- }
- catch (final CheckstyleException e) {
- System.out.println("Error loading configuration file");
- e.printStackTrace(System.out);
- System.exit(1);
- return null;
- }
+ Properties aProps) throws CheckstyleException {
+ return ConfigurationLoader.loadConfiguration(aConfigName,
+ new PropertiesExpander(aProps));
}
Configuration getConfiguration() {
diff --git a/src/it/java/com/google/checkstyle/test/base/IndentationConfigurationBuilder.java b/src/it/java/com/google/checkstyle/test/base/IndentationConfigurationBuilder.java
index 400e375d0..74b2ac2c3 100644
--- a/src/it/java/com/google/checkstyle/test/base/IndentationConfigurationBuilder.java
+++ b/src/it/java/com/google/checkstyle/test/base/IndentationConfigurationBuilder.java
@@ -32,6 +32,7 @@ import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.utils.CommonUtils;
public class IndentationConfigurationBuilder extends ConfigurationBuilder {
@@ -55,7 +56,7 @@ public class IndentationConfigurationBuilder extends ConfigurationBuilder {
private static final Pattern NON_STRICT_LEVEL_COMMENT_REGEX =
Pattern.compile("//indent:\\d+ exp:>=(\\d+)( warn)?");
- public IndentationConfigurationBuilder(File aRoot) {
+ public IndentationConfigurationBuilder(File aRoot) throws CheckstyleException {
super(aRoot);
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule21filename/OuterTypeFilenameTest.java b/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule21filename/OuterTypeFilenameTest.java
index 6b3b67794..62d0ca9f6 100644
--- a/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule21filename/OuterTypeFilenameTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule21filename/OuterTypeFilenameTest.java
@@ -27,6 +27,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.OuterTypeFilenameCheck;
@@ -35,7 +36,7 @@ public class OuterTypeFilenameTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule231filetab/FileTabCharacterTest.java b/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule231filetab/FileTabCharacterTest.java
index 5fe580a28..cf4f5567e 100644
--- a/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule231filetab/FileTabCharacterTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule231filetab/FileTabCharacterTest.java
@@ -27,6 +27,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck;
@@ -35,7 +36,7 @@ public class FileTabCharacterTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule232specialescape/IllegalTokenTextTest.java b/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule232specialescape/IllegalTokenTextTest.java
index 7e03c3907..fa2fa07b3 100644
--- a/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule232specialescape/IllegalTokenTextTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule232specialescape/IllegalTokenTextTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
public class IllegalTokenTextTest extends BaseCheckTestSupport {
@@ -33,7 +34,7 @@ public class IllegalTokenTextTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule233nonascii/AvoidEscapedUnicodeCharactersTest.java b/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule233nonascii/AvoidEscapedUnicodeCharactersTest.java
index a2103c298..5915832d3 100644
--- a/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule233nonascii/AvoidEscapedUnicodeCharactersTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule233nonascii/AvoidEscapedUnicodeCharactersTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.AvoidEscapedUnicodeCharactersCheck;
@@ -34,7 +35,7 @@ public class AvoidEscapedUnicodeCharactersTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule32packagestate/LineLengthTest.java b/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule32packagestate/LineLengthTest.java
index 93a086e72..86905a36f 100644
--- a/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule32packagestate/LineLengthTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule32packagestate/LineLengthTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck;
@@ -34,7 +35,7 @@ public class LineLengthTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule331nowildcard/AvoidStarImportTest.java b/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule331nowildcard/AvoidStarImportTest.java
index 0d2e07b30..ed52692d0 100644
--- a/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule331nowildcard/AvoidStarImportTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule331nowildcard/AvoidStarImportTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
public class AvoidStarImportTest extends BaseCheckTestSupport {
@@ -33,7 +34,7 @@ public class AvoidStarImportTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule332nolinewrap/NoLineWrapTest.java b/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule332nolinewrap/NoLineWrapTest.java
index 45d34a659..a9a0a314d 100644
--- a/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule332nolinewrap/NoLineWrapTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule332nolinewrap/NoLineWrapTest.java
@@ -27,6 +27,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck;
import com.puppycrawl.tools.checkstyle.checks.whitespace.NoLineWrapCheck;
@@ -36,7 +37,7 @@ public class NoLineWrapTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule333orderingandspacing/CustomImportOrderTest.java b/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule333orderingandspacing/CustomImportOrderTest.java
index 6d9dda4ad..c86c1a1db 100644
--- a/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule333orderingandspacing/CustomImportOrderTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule333orderingandspacing/CustomImportOrderTest.java
@@ -27,6 +27,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck;
@@ -44,7 +45,7 @@ public class CustomImportOrderTest extends BaseCheckTestSupport {
private final Class clazz = CustomImportOrderCheck.class;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule341onetoplevel/OneTopLevelClassTest.java b/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule341onetoplevel/OneTopLevelClassTest.java
index b3e89fbb3..a5e770b74 100644
--- a/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule341onetoplevel/OneTopLevelClassTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule341onetoplevel/OneTopLevelClassTest.java
@@ -27,6 +27,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.design.OneTopLevelClassCheck;
@@ -35,7 +36,7 @@ public class OneTopLevelClassTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule3421overloadsplit/OverloadMethodsDeclarationOrderTest.java b/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule3421overloadsplit/OverloadMethodsDeclarationOrderTest.java
index 6b5e01c50..b61cfaf25 100644
--- a/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule3421overloadsplit/OverloadMethodsDeclarationOrderTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule3421overloadsplit/OverloadMethodsDeclarationOrderTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.coding.OverloadMethodsDeclarationOrderCheck;
@@ -34,7 +35,7 @@ public class OverloadMethodsDeclarationOrderTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule3sourcefile/EmptyLineSeparatorTest.java b/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule3sourcefile/EmptyLineSeparatorTest.java
index 322c51003..508683d72 100644
--- a/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule3sourcefile/EmptyLineSeparatorTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule3sourcefile/EmptyLineSeparatorTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck;
@@ -34,7 +35,7 @@ public class EmptyLineSeparatorTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule411bracesareused/NeedBracesTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule411bracesareused/NeedBracesTest.java
index 2e68aa7e9..0ecf55675 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule411bracesareused/NeedBracesTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule411bracesareused/NeedBracesTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.blocks.NeedBracesCheck;
@@ -34,7 +35,7 @@ public class NeedBracesTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/LeftCurlyTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/LeftCurlyTest.java
index b6d56c2d9..ed905296c 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/LeftCurlyTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/LeftCurlyTest.java
@@ -28,6 +28,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.blocks.LeftCurlyCheck;
@@ -36,7 +37,7 @@ public class LeftCurlyTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/RightCurlyTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/RightCurlyTest.java
index aa69311a1..5609099b8 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/RightCurlyTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/RightCurlyTest.java
@@ -31,6 +31,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.checks.blocks.RightCurlyCheck;
import com.puppycrawl.tools.checkstyle.checks.blocks.RightCurlyOption;
@@ -39,7 +40,7 @@ public class RightCurlyTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule413emptyblocks/EmptyBlockTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule413emptyblocks/EmptyBlockTest.java
index 2efa48095..7f53d2d7a 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule413emptyblocks/EmptyBlockTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule413emptyblocks/EmptyBlockTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheck;
@@ -34,7 +35,7 @@ public class EmptyBlockTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule413emptyblocks/EmptyCatchBlockTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule413emptyblocks/EmptyCatchBlockTest.java
index 8fe7aa17a..06e8425b9 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule413emptyblocks/EmptyCatchBlockTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule413emptyblocks/EmptyCatchBlockTest.java
@@ -27,6 +27,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.blocks.EmptyCatchBlockCheck;
@@ -34,7 +35,7 @@ public class EmptyCatchBlockTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule43onestatement/OneStatementPerLineTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule43onestatement/OneStatementPerLineTest.java
index 51ce9a845..d18727016 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule43onestatement/OneStatementPerLineTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule43onestatement/OneStatementPerLineTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.coding.OneStatementPerLineCheck;
@@ -34,7 +35,7 @@ public class OneStatementPerLineTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule44columnlimit/LineLengthTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule44columnlimit/LineLengthTest.java
index 2ab80382c..ad06e201d 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule44columnlimit/LineLengthTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule44columnlimit/LineLengthTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck;
@@ -34,7 +35,7 @@ public class LineLengthTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreak/MethodParamPadTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreak/MethodParamPadTest.java
index 644939488..5fa1ac135 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreak/MethodParamPadTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreak/MethodParamPadTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.whitespace.MethodParamPadCheck;
@@ -34,7 +35,7 @@ public class MethodParamPadTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreak/OperatorWrapTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreak/OperatorWrapTest.java
index bdf21ab8d..eddc0fb84 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreak/OperatorWrapTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreak/OperatorWrapTest.java
@@ -27,6 +27,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.whitespace.OperatorWrapCheck;
import com.puppycrawl.tools.checkstyle.checks.whitespace.WrapOption;
@@ -36,7 +37,7 @@ public class OperatorWrapTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreak/SeparatorWrapTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreak/SeparatorWrapTest.java
index a5cb93a98..a4d0b92f4 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreak/SeparatorWrapTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreak/SeparatorWrapTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.whitespace.SeparatorWrapCheck;
@@ -34,7 +35,7 @@ public class SeparatorWrapTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule461verticalwhitespace/EmptyLineSeparatorTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule461verticalwhitespace/EmptyLineSeparatorTest.java
index fb62e0cb0..5b6f16124 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule461verticalwhitespace/EmptyLineSeparatorTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule461verticalwhitespace/EmptyLineSeparatorTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck;
@@ -34,7 +35,7 @@ public class EmptyLineSeparatorTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule462horizontalwhitespace/GenericWhitespaceTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule462horizontalwhitespace/GenericWhitespaceTest.java
index 9094b972e..43f8946a1 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule462horizontalwhitespace/GenericWhitespaceTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule462horizontalwhitespace/GenericWhitespaceTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
public class GenericWhitespaceTest extends BaseCheckTestSupport {
@@ -33,7 +34,7 @@ public class GenericWhitespaceTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule462horizontalwhitespace/WhitespaceAroundTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule462horizontalwhitespace/WhitespaceAroundTest.java
index a8de72b58..bcefb80d6 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule462horizontalwhitespace/WhitespaceAroundTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule462horizontalwhitespace/WhitespaceAroundTest.java
@@ -27,6 +27,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
public class WhitespaceAroundTest extends BaseCheckTestSupport {
@@ -34,7 +35,7 @@ public class WhitespaceAroundTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4821onevariableperline/MultipleVariableDeclarationsTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4821onevariableperline/MultipleVariableDeclarationsTest.java
index d613a560f..84515e070 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4821onevariableperline/MultipleVariableDeclarationsTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4821onevariableperline/MultipleVariableDeclarationsTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.coding.MultipleVariableDeclarationsCheck;
@@ -34,7 +35,7 @@ public class MultipleVariableDeclarationsTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4822variabledistance/VariableDeclarationUsageDistanceTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4822variabledistance/VariableDeclarationUsageDistanceTest.java
index 69a07ca9d..f59325b1d 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4822variabledistance/VariableDeclarationUsageDistanceTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4822variabledistance/VariableDeclarationUsageDistanceTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck;
@@ -34,7 +35,7 @@ public class VariableDeclarationUsageDistanceTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4832nocstylearray/ArrayTypeStyleTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4832nocstylearray/ArrayTypeStyleTest.java
index 52aa560e3..191c24042 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4832nocstylearray/ArrayTypeStyleTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4832nocstylearray/ArrayTypeStyleTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.ArrayTypeStyleCheck;
@@ -34,7 +35,7 @@ public class ArrayTypeStyleTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4841indentation/IndentationTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4841indentation/IndentationTest.java
index 97617a7f1..3cce33ab2 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4841indentation/IndentationTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4841indentation/IndentationTest.java
@@ -28,6 +28,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.google.checkstyle.test.base.IndentationConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
public class IndentationTest extends BaseCheckTestSupport {
@@ -35,7 +36,7 @@ public class IndentationTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new IndentationConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4842fallthrough/FallThroughTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4842fallthrough/FallThroughTest.java
index 3d3fabc62..7dc79200d 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4842fallthrough/FallThroughTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4842fallthrough/FallThroughTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.coding.FallThroughCheck;
@@ -34,7 +35,7 @@ public class FallThroughTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4843defaultcasepresent/MissingSwitchDefaultTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4843defaultcasepresent/MissingSwitchDefaultTest.java
index d1e5162eb..dc4f0af74 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4843defaultcasepresent/MissingSwitchDefaultTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4843defaultcasepresent/MissingSwitchDefaultTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck;
@@ -34,7 +35,7 @@ public class MissingSwitchDefaultTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule485annotations/AnnotationLocationTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule485annotations/AnnotationLocationTest.java
index 7bf6a8661..2a7c4e062 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule485annotations/AnnotationLocationTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule485annotations/AnnotationLocationTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationLocationCheck;
@@ -34,7 +35,7 @@ public class AnnotationLocationTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4861blockcommentstyle/CommentsIndentationTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4861blockcommentstyle/CommentsIndentationTest.java
index a00d353dc..3ac0214dc 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4861blockcommentstyle/CommentsIndentationTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4861blockcommentstyle/CommentsIndentationTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.indentation.CommentsIndentationCheck;
@@ -34,7 +35,7 @@ public class CommentsIndentationTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule487modifiers/ModifierOrderTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule487modifiers/ModifierOrderTest.java
index aa120edec..c8d479652 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule487modifiers/ModifierOrderTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule487modifiers/ModifierOrderTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.modifier.ModifierOrderCheck;
@@ -34,7 +35,7 @@ public class ModifierOrderTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule488numericliterals/UpperEllTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule488numericliterals/UpperEllTest.java
index 91e31b8bf..30967d7a4 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule488numericliterals/UpperEllTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule488numericliterals/UpperEllTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
public class UpperEllTest extends BaseCheckTestSupport {
@@ -33,7 +34,7 @@ public class UpperEllTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter5naming/rule522typenames/TypeNameTest.java b/src/it/java/com/google/checkstyle/test/chapter5naming/rule522typenames/TypeNameTest.java
index 094ed7c04..06987decb 100644
--- a/src/it/java/com/google/checkstyle/test/chapter5naming/rule522typenames/TypeNameTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter5naming/rule522typenames/TypeNameTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
public class TypeNameTest extends BaseCheckTestSupport {
@@ -33,7 +34,7 @@ public class TypeNameTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter5naming/rule523methodnames/MethodNameTest.java b/src/it/java/com/google/checkstyle/test/chapter5naming/rule523methodnames/MethodNameTest.java
index bb479e817..8f8bda024 100644
--- a/src/it/java/com/google/checkstyle/test/chapter5naming/rule523methodnames/MethodNameTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter5naming/rule523methodnames/MethodNameTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
public class MethodNameTest extends BaseCheckTestSupport {
@@ -33,7 +34,7 @@ public class MethodNameTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter5naming/rule53camelcase/AbbreviationAsWordInNameTest.java b/src/it/java/com/google/checkstyle/test/chapter5naming/rule53camelcase/AbbreviationAsWordInNameTest.java
index 982263e3f..8316551b3 100644
--- a/src/it/java/com/google/checkstyle/test/chapter5naming/rule53camelcase/AbbreviationAsWordInNameTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter5naming/rule53camelcase/AbbreviationAsWordInNameTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.naming.AbbreviationAsWordInNameCheck;
@@ -37,7 +38,7 @@ public class AbbreviationAsWordInNameTest extends BaseCheckTestSupport {
private final Class clazz = AbbreviationAsWordInNameCheck.class;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
checkConfig = builder.getCheckConfig("AbbreviationAsWordInName");
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter6programpractice/rule62donotignoreexceptions/EmptyBlockTest.java b/src/it/java/com/google/checkstyle/test/chapter6programpractice/rule62donotignoreexceptions/EmptyBlockTest.java
index 6d207501e..98a9da963 100644
--- a/src/it/java/com/google/checkstyle/test/chapter6programpractice/rule62donotignoreexceptions/EmptyBlockTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter6programpractice/rule62donotignoreexceptions/EmptyBlockTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheck;
@@ -34,7 +35,7 @@ public class EmptyBlockTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter6programpractice/rule64finalizers/NoFinalizerTest.java b/src/it/java/com/google/checkstyle/test/chapter6programpractice/rule64finalizers/NoFinalizerTest.java
index ee0bbb327..c5165d632 100644
--- a/src/it/java/com/google/checkstyle/test/chapter6programpractice/rule64finalizers/NoFinalizerTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter6programpractice/rule64finalizers/NoFinalizerTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.coding.NoFinalizerCheck;
@@ -34,7 +35,7 @@ public class NoFinalizerTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule711generalform/SingleLineJavadocTest.java b/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule711generalform/SingleLineJavadocTest.java
index fd48161cc..f35855804 100644
--- a/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule711generalform/SingleLineJavadocTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule711generalform/SingleLineJavadocTest.java
@@ -27,6 +27,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.javadoc.SingleLineJavadocCheck;
@@ -35,7 +36,7 @@ public class SingleLineJavadocTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule712paragraphs/JavadocParagraphTest.java b/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule712paragraphs/JavadocParagraphTest.java
index b16772613..650d6d282 100644
--- a/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule712paragraphs/JavadocParagraphTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule712paragraphs/JavadocParagraphTest.java
@@ -27,6 +27,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocParagraphCheck;
@@ -35,7 +36,7 @@ public class JavadocParagraphTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule713atclauses/AtclauseOrderTest.java b/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule713atclauses/AtclauseOrderTest.java
index a063e98b0..49c32f6aa 100644
--- a/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule713atclauses/AtclauseOrderTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule713atclauses/AtclauseOrderTest.java
@@ -27,6 +27,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.javadoc.AtclauseOrderCheck;
@@ -35,7 +36,7 @@ public class AtclauseOrderTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule713atclauses/NonEmptyAtclauseDescriptionTest.java b/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule713atclauses/NonEmptyAtclauseDescriptionTest.java
index 91b7c3309..69d9a385c 100644
--- a/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule713atclauses/NonEmptyAtclauseDescriptionTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule713atclauses/NonEmptyAtclauseDescriptionTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.javadoc.NonEmptyAtclauseDescriptionCheck;
@@ -34,7 +35,7 @@ public class NonEmptyAtclauseDescriptionTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule72thesummaryfragment/SummaryJavadocTest.java b/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule72thesummaryfragment/SummaryJavadocTest.java
index c7116aec6..84d4a26c9 100644
--- a/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule72thesummaryfragment/SummaryJavadocTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule72thesummaryfragment/SummaryJavadocTest.java
@@ -27,6 +27,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.javadoc.SummaryJavadocCheck;
@@ -35,7 +36,7 @@ public class SummaryJavadocTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule731selfexplanatory/JavadocMethodTest.java b/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule731selfexplanatory/JavadocMethodTest.java
index 3dc2ee847..9d0d3eaa0 100644
--- a/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule731selfexplanatory/JavadocMethodTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule731selfexplanatory/JavadocMethodTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck;
@@ -34,7 +35,7 @@ public class JavadocMethodTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
- public static void setConfigurationBuilder() {
+ public static void setConfigurationBuilder() throws CheckstyleException {
builder = new ConfigurationBuilder(new File("src/it/"));
}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammars/comments/CompareTreesWithComments.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/comments/CompareTreesWithComments.java
index e5065ec6a..5abc375c4 100644
--- a/src/test/java/com/puppycrawl/tools/checkstyle/grammars/comments/CompareTreesWithComments.java
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/comments/CompareTreesWithComments.java
@@ -50,7 +50,9 @@ class CompareTreesWithComments extends Check {
@Override
public void beginTree(DetailAST rootAST) {
- Assert.assertTrue(isAstEquals(expectedTree, rootAST));
+ if (!isAstEquals(expectedTree, rootAST)) {
+ Assert.assertEquals(expectedTree, rootAST);
+ }
}
private static boolean isAstEquals(DetailAST expected, DetailAST actual) {
@@ -64,9 +66,6 @@ class CompareTreesWithComments extends Check {
else {
result = isAstEqualsSafe(expected, actual);
}
- if (!result) {
- System.out.println("Expected: " + expected + " | Actual: " + actual);
- }
return result;
}