aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/suppressions.xml6
-rw-r--r--src/it/java/com/google/checkstyle/test/base/BriefLogger.java9
-rw-r--r--src/it/java/com/google/checkstyle/test/base/ConfigValidationTest.java4
-rw-r--r--src/it/java/com/google/checkstyle/test/base/IndentationConfigurationBuilder.java3
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter2filebasic/rule21filename/OuterTypeFilenameTest.java2
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter2filebasic/rule231filetab/FileTabCharacterTest.java12
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter2filebasic/rule232specialescape/IllegalTokenTextTest.java10
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter2filebasic/rule233nonascii/AvoidEscapedUnicodeCharactersCheckTest.java8
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter3filestructure/rule32packagestate/LineLengthTest.java8
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter3filestructure/rule331nowildcard/AvoidStarImportTest.java8
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter3filestructure/rule332nolinewrap/NoLineWrapTest.java2
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter3filestructure/rule333orderingandsoacing/CustomImportOrderTest.java22
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter3filestructure/rule341onetoplevel/OneTopLevelClassTest.java36
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter3filestructure/rule3421overloadsplit/OverloadMethodsDeclarationOrderTest.java10
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter3filestructure/rule3sourcefile/EmptyLineSeparatorTest.java2
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule411bracesareused/NeedBracesTest.java10
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/LeftCurlyRightCurlyTest.java16
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule413emptyblocks/EmptyBlockTest.java16
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule413emptyblocks/EmptyCatchBlockTest.java17
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule43onestatement/OneStatementPerLineTest.java2
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule44cloumunlimit/LineLengthTest.java10
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreack/MethodParamPadTest.java8
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreack/OperatorWrapTest.java12
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreack/SeparatorWrapTest.java6
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule461verticalwhitespace/EmptyLineSeparatorTest.java4
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule462horizontalwhitespace/WhitespaceAroundTest.java18
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule4821onevariablepreline/MultipleVariableDeclarationsTest.java10
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule4822variabledistance/VariableDeclarationUsageDistanceTest.java2
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule4832nocstylearray/ArrayTypeStyleTest.java12
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule4841indentation/IndentationTest.java2
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule4842fallthrow/FallThroughTest.java12
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule4843defaultcasepresent/MissingSwitchDefaultTest.java12
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule485annotations/AnnotationLocationTest.java8
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule487modifiers/ModifierOrderTest.java12
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter4formatting/rule488numericliterals/UpperEllTest.java12
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter5naming/rule521packagenames/PackageNameTest.java3
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter5naming/rule522typenames/TypeNameTest.java2
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter5naming/rule523methodnames/MethodNameTest.java12
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter5naming/rule525nonconstantfieldnames/MemberNameTest.java2
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter5naming/rule526parameternames/ParameterNameTest.java2
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter5naming/rule527localvariablenames/LocalVariableNameTest.java2
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter5naming/rule528typevariablenames/ClassMethodTypeParameterNameTest.java2
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter5naming/rule53camelcase/AbbreviationAsWordInNameTest.java8
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter6programpractice/rule62donotignoreexceptions/EmptyBlockTest.java10
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter6programpractice/rule64finalizers/NoFinalizerTest.java12
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter7javadoc/rule711generalform/SingleLineJavadocTest.java8
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter7javadoc/rule712paragraphs/JavadocParagraphTest.java8
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter7javadoc/rule713atclauses/AtclauseOrderTest.java8
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter7javadoc/rule713atclauses/JavadocTagContinuationIndentationTest.java8
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter7javadoc/rule713atclauses/NonEmptyAtclauseDescriptionTest.java6
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter7javadoc/rule72thesummaryfragment/SummaryJavadocTest.java10
-rw-r--r--src/it/java/com/google/checkstyle/test/chapter7javadoc/rule731selfexplanatory/JavadocMethodTest.java2
52 files changed, 222 insertions, 226 deletions
diff --git a/config/suppressions.xml b/config/suppressions.xml
index 33e30e019..fffc9ebcb 100644
--- a/config/suppressions.xml
+++ b/config/suppressions.xml
@@ -40,7 +40,7 @@
<suppress checks="EmptyBlock" files=".*[\\/]src[\\/]test[\\/]"/>
<suppress checks="ImportControl" files=".*[\\/]src[\\/](test|it)[\\/]"/>
<suppress checks="Javadoc" files=".*[\\/]src[\\/](test|it)[\\/]"/>
- <suppress checks="MagicNumber" files=".*[\\/]src[\\/]test[\\/]"/>
+ <suppress checks="MagicNumber" files=".*[\\/]src[\\/](test|it)[\\/]"/>
<suppress checks="AvoidStaticImport" files=".*[\\/]src[\\/](test|it)[\\/]"/>
<suppress checks="MethodCount" files="[\\/]ImportOrderCheckTest.java$"/>
<suppress checks="MethodCount" files="[\\/]IndentationCheckTest.java$"/>
@@ -48,10 +48,10 @@
<suppress checks="MethodCount" files="[\\/]MainTest.java$"/>
<suppress checks="EqualsAvoidNull" files="[\\/]Int.*FilterTest.java$"/>
<suppress checks="VisibilityModifier" files="[\\/]BaseCheckTestSupport.java$"/>
- <suppress checks="WriteTag" files=".*[\\/]src[\\/]test[\\/]"/>
+ <suppress checks="WriteTag" files=".*[\\/]src[\\/](test|it)[\\/]"/>
<!-- Suppressions to remove over time -->
- <suppress checks="." files=".*[\\/]src[\\/]it[\\/]" lines="28-999"/>
+ <suppress checks="." files=".*[\\/]src[\\/]it[\\/]" lines="40-999"/>
<!--
Turn off all checks for Generated and Test code. Fixes issues with using
diff --git a/src/it/java/com/google/checkstyle/test/base/BriefLogger.java b/src/it/java/com/google/checkstyle/test/base/BriefLogger.java
index 39906467d..495a7b846 100644
--- a/src/it/java/com/google/checkstyle/test/base/BriefLogger.java
+++ b/src/it/java/com/google/checkstyle/test/base/BriefLogger.java
@@ -25,12 +25,11 @@ import com.puppycrawl.tools.checkstyle.DefaultLogger;
import com.puppycrawl.tools.checkstyle.api.AuditEvent;
/** A brief logger that only display info about errors. */
-class BriefLogger extends DefaultLogger
-{
- BriefLogger(OutputStream out)
- {
+class BriefLogger extends DefaultLogger {
+ BriefLogger(OutputStream out) {
super(out, true, out, false, false);
}
+
@Override
- public void auditStarted(AuditEvent event) {}
+ public void auditStarted(AuditEvent event) { }
}
diff --git a/src/it/java/com/google/checkstyle/test/base/ConfigValidationTest.java b/src/it/java/com/google/checkstyle/test/base/ConfigValidationTest.java
index 18cfc4396..3f9a2decf 100644
--- a/src/it/java/com/google/checkstyle/test/base/ConfigValidationTest.java
+++ b/src/it/java/com/google/checkstyle/test/base/ConfigValidationTest.java
@@ -34,7 +34,7 @@ import com.puppycrawl.tools.checkstyle.api.Configuration;
public class ConfigValidationTest extends BaseCheckTestSupport {
@Test
public void testGoogleChecks() throws Exception {
- ConfigurationBuilder builder = new ConfigurationBuilder(new File("src/it/"));
+ final ConfigurationBuilder builder = new ConfigurationBuilder(new File("src/it/"));
final Configuration checkerConfig = builder.getConfiguration();
final Checker checker = new Checker();
final Locale locale = Locale.ROOT;
@@ -45,7 +45,7 @@ public class ConfigValidationTest extends BaseCheckTestSupport {
checker.addListener(new BriefLogger(stream));
final List<File> files = builder.getFiles();
-
+
//runs over all input files;
//as severity level is "warning", no errors expected
verify(checker, files.toArray(new File[files.size()]), "",
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 c2fa2c985..c64895442 100644
--- a/src/it/java/com/google/checkstyle/test/base/IndentationConfigurationBuilder.java
+++ b/src/it/java/com/google/checkstyle/test/base/IndentationConfigurationBuilder.java
@@ -34,8 +34,7 @@ import java.util.regex.Pattern;
import com.puppycrawl.tools.checkstyle.utils.CommonUtils;
-public class IndentationConfigurationBuilder extends ConfigurationBuilder
-{
+public class IndentationConfigurationBuilder extends ConfigurationBuilder {
private static final int TAB_WIDTH = 4;
public IndentationConfigurationBuilder(File 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 5a7896a15..194bb5d1e 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
@@ -30,7 +30,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.OuterTypeFilenameCheck;
-public class OuterTypeFilenameTest extends BaseCheckTestSupport{
+public class OuterTypeFilenameTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
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 fde40d54c..188af2866 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
@@ -30,15 +30,15 @@ import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck;
-public class FileTabCharacterTest extends BaseCheckTestSupport{
-
+public class FileTabCharacterTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
}
-
+
@Override
protected DefaultConfiguration createCheckerConfig(
Configuration aConfig)
@@ -63,12 +63,12 @@ public class FileTabCharacterTest extends BaseCheckTestSupport{
"133:3: " + getCheckMessage(FileTabCharacterCheck.class, "containsTab"),
"134:3: " + getCheckMessage(FileTabCharacterCheck.class, "containsTab"),
};
-
+
String filePath = builder.getFilePath("FileTabCharacterInput");
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(createChecker(checkConfig),filePath,
expected, warnList);
- }
+ }
/**
* Creates a configuration that is functionally close to that in the docs.
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 8421e5579..754c92d2d 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
@@ -28,10 +28,10 @@ import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
-public class IllegalTokenTextTest extends BaseCheckTestSupport{
-
+public class IllegalTokenTextTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -39,7 +39,7 @@ public class IllegalTokenTextTest extends BaseCheckTestSupport{
@Test
public void illegalTokensTest() throws Exception {
-
+
final String[] expected = {
"17:27: Avoid using corresponding octal or Unicode escape.",
"18:27: Avoid using corresponding octal or Unicode escape.",
@@ -111,7 +111,7 @@ public class IllegalTokenTextTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("IllegalTokenText");
String filePath = builder.getFilePath("IllegalTokenTextInput");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule233nonascii/AvoidEscapedUnicodeCharactersCheckTest.java b/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule233nonascii/AvoidEscapedUnicodeCharactersCheckTest.java
index fd3f1cfcb..b4e9f02af 100644
--- a/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule233nonascii/AvoidEscapedUnicodeCharactersCheckTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter2filebasic/rule233nonascii/AvoidEscapedUnicodeCharactersCheckTest.java
@@ -29,10 +29,10 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.AvoidEscapedUnicodeCharactersCheck;
-public class AvoidEscapedUnicodeCharactersCheckTest extends BaseCheckTestSupport{
-
+public class AvoidEscapedUnicodeCharactersCheckTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -54,7 +54,7 @@ public class AvoidEscapedUnicodeCharactersCheckTest extends BaseCheckTestSupport
Configuration checkConfig = builder.getCheckConfig("AvoidEscapedUnicodeCharacters");
String filePath = builder.getFilePath("AvoidEscapedUnicodeCharactersInput");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 c27bfa8fc..2d1f531cd 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
@@ -29,10 +29,10 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck;
-public class LineLengthTest extends BaseCheckTestSupport{
-
+public class LineLengthTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -54,7 +54,7 @@ public class LineLengthTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("LineLength");
String filePath = builder.getFilePath("LineLengthInput2");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 30d4df3fe..5af8d7a89 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
@@ -28,10 +28,10 @@ import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
-public class AvoidStarImportTest extends BaseCheckTestSupport{
-
+public class AvoidStarImportTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -46,7 +46,7 @@ public class AvoidStarImportTest extends BaseCheckTestSupport{
"18: Using the '.*' form of import should be avoided - javax.swing.WindowConstants.*.",
"19: Using the '.*' form of import should be avoided - javax.swing.WindowConstants.*.",
};
-
+
Configuration checkConfig = builder.getCheckConfig("AvoidStarImport");
String filePath = builder.getFilePath("AvoidStarImportInput");
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 4fe591e74..4db2f6d3d 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
@@ -31,7 +31,7 @@ import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck;
import com.puppycrawl.tools.checkstyle.checks.whitespace.NoLineWrapCheck;
-public class NoLineWrapTest extends BaseCheckTestSupport{
+public class NoLineWrapTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
diff --git a/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule333orderingandsoacing/CustomImportOrderTest.java b/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule333orderingandsoacing/CustomImportOrderTest.java
index ffcede559..a05daba75 100644
--- a/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule333orderingandsoacing/CustomImportOrderTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter3filestructure/rule333orderingandsoacing/CustomImportOrderTest.java
@@ -30,7 +30,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck;
-public class CustomImportOrderTest extends BaseCheckTestSupport{
+public class CustomImportOrderTest extends BaseCheckTestSupport {
private static final String MSG_SEPARATOR = "custom.import.order.line.separator";
private static final String MSG_LEX = "custom.import.order.lex";
@@ -50,7 +50,7 @@ public class CustomImportOrderTest extends BaseCheckTestSupport{
@Test
public void customImportTest1() throws Exception {
-
+
final String[] expected = {
"4: " + getCheckMessage(clazz, MSG_LEX, "java.awt.Button.ABORT", "java.io.File.createTempFile"),
"7: " + getCheckMessage(clazz, MSG_ORDER, STD, SPECIAL, "java.awt.Button"),
@@ -64,17 +64,17 @@ public class CustomImportOrderTest extends BaseCheckTestSupport{
"15: " + getCheckMessage(clazz, MSG_ORDER, STD, SPECIAL, "java.io.InputStream"),
"16: " + getCheckMessage(clazz, MSG_ORDER, STD, SPECIAL, "java.io.Reader"),
};
-
+
Configuration checkConfig = builder.getCheckConfig("CustomImportOrder");
String filePath = builder.getFilePath("CustomImportOrderInput_1");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
@Test
public void customImportTest2() throws Exception {
-
+
final String[] expected = {
"4: " + getCheckMessage(clazz, MSG_LEX, "java.awt.Button.ABORT", "java.io.File.createTempFile"),
"7: " + getCheckMessage(clazz, MSG_ORDER, STD, SPECIAL, "java.util.List"),
@@ -88,14 +88,14 @@ public class CustomImportOrderTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("CustomImportOrder");
String filePath = builder.getFilePath("CustomImportOrderInput_2");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
@Test
public void customImportTest3() throws Exception {
-
+
final String[] expected = {
"4: " + getCheckMessage(clazz, MSG_LEX, "java.awt.Button.ABORT", "java.io.File.createTempFile"),
"8: " + getCheckMessage(clazz, MSG_ORDER, STD, SPECIAL, "java.util.StringTokenizer"),
@@ -108,18 +108,18 @@ public class CustomImportOrderTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("CustomImportOrder");
String filePath = builder.getFilePath("CustomImportOrderInput_3");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
@Test
public void validTest() throws Exception {
-
+
final String[] expected = ArrayUtils.EMPTY_STRING_ARRAY;
-
+
Configuration checkConfig = builder.getCheckConfig("CustomImportOrder");
String filePath = builder.getFilePath("CustomImportOrderValidInput");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 f53e60918..5d272ef50 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
@@ -30,10 +30,10 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.design.OneTopLevelClassCheck;
-public class OneTopLevelClassTest extends BaseCheckTestSupport{
-
+public class OneTopLevelClassTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -41,7 +41,7 @@ public class OneTopLevelClassTest extends BaseCheckTestSupport{
@Test
public void badTest() throws Exception {
-
+
Class<OneTopLevelClassCheck> clazz = OneTopLevelClassCheck.class;
String messageKey = "one.top.level.class";
@@ -53,57 +53,57 @@ public class OneTopLevelClassTest extends BaseCheckTestSupport{
"60: " + getCheckMessage(clazz, messageKey, "MyClassWithGenericSuperMethod"),
"77: " + getCheckMessage(clazz, messageKey, "AnotherClass"),
};
-
+
Configuration checkConfig = builder.getCheckConfig("OneTopLevelClass");
String filePath = builder.getFilePath("OneTopLevelClassInput_Basic");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
@Test
public void goodTest() throws Exception {
-
+
final String[] expected = ArrayUtils.EMPTY_STRING_ARRAY;
-
+
Configuration checkConfig = builder.getCheckConfig("OneTopLevelClass");
String filePath = builder.getFilePath("OneTopLevelClassInputGood");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
-
+
@Test
public void bad2Test() throws Exception {
Class<OneTopLevelClassCheck> clazz = OneTopLevelClassCheck.class;
String messageKey = "one.top.level.class";
-
+
final String[] expected = {
"4: " + getCheckMessage(clazz, messageKey, "FooEnum"),
};
-
+
Configuration checkConfig = builder.getCheckConfig("OneTopLevelClass");
String filePath = builder.getFilePath("OneTopLevelClassBad2");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
-
+
@Test
public void bad3Test() throws Exception {
-
+
Class<OneTopLevelClassCheck> clazz = OneTopLevelClassCheck.class;
String messageKey = "one.top.level.class";
-
+
final String[] expected = {
"5: " + getCheckMessage(clazz, messageKey, "FooIn"),
"7: " + getCheckMessage(clazz, messageKey, "FooClass"),
};
-
+
Configuration checkConfig = builder.getCheckConfig("OneTopLevelClass");
String filePath = builder.getFilePath("OneTopLevelClassBad3");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 7727c74e7..7d7b1cbc8 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
@@ -29,10 +29,10 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.coding.OverloadMethodsDeclarationOrderCheck;
-public class OverloadMethodsDeclarationOrderTest extends BaseCheckTestSupport{
-
+public class OverloadMethodsDeclarationOrderTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -40,7 +40,7 @@ public class OverloadMethodsDeclarationOrderTest extends BaseCheckTestSupport{
@Test
public void overloadMethodsTest() throws Exception {
-
+
Class<OverloadMethodsDeclarationOrderCheck> clazz = OverloadMethodsDeclarationOrderCheck.class;
String messageKey = "overload.methods.declaration";
@@ -53,7 +53,7 @@ public class OverloadMethodsDeclarationOrderTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("OverloadMethodsDeclarationOrder");
String filePath = builder.getFilePath("InputOverloadMethodsDeclarationOrder");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 ccab8bfeb..40868231e 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
@@ -29,7 +29,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck;
-public class EmptyLineSeparatorTest extends BaseCheckTestSupport{
+public class EmptyLineSeparatorTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
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 c34c02d57..11581a095 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
@@ -29,10 +29,10 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.blocks.NeedBracesCheck;
-public class NeedBracesTest extends BaseCheckTestSupport{
-
+public class NeedBracesTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -40,7 +40,7 @@ public class NeedBracesTest extends BaseCheckTestSupport{
@Test
public void needBracesTest() throws Exception {
-
+
Class<NeedBracesCheck> clazz = NeedBracesCheck.class;
String messageKey = "needBraces";
@@ -87,7 +87,7 @@ public class NeedBracesTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("NeedBraces");
String filePath = builder.getFilePath("NeedBracesInput");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/LeftCurlyRightCurlyTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/LeftCurlyRightCurlyTest.java
index ed717bfb0..7c0a8668f 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/LeftCurlyRightCurlyTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/LeftCurlyRightCurlyTest.java
@@ -38,9 +38,9 @@ import com.puppycrawl.tools.checkstyle.checks.blocks.RightCurlyCheck;
import com.puppycrawl.tools.checkstyle.checks.blocks.RightCurlyOption;
public class LeftCurlyRightCurlyTest extends BaseCheckTestSupport {
-
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -61,11 +61,11 @@ public class LeftCurlyRightCurlyTest extends BaseCheckTestSupport {
Configuration checkConfig = builder.getCheckConfig("LeftCurly");
String filePath = builder.getFilePath("LeftCurlyInput_Braces");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
-
+
@Test
public void leftCurlyAnnotationsTest() throws Exception {
@@ -76,14 +76,14 @@ public class LeftCurlyRightCurlyTest extends BaseCheckTestSupport {
"27:5: " + getCheckMessage(LeftCurlyCheck.class, MSG_KEY_LINE_PREVIOUS, "{", 5),
"50:5: " + getCheckMessage(LeftCurlyCheck.class, MSG_KEY_LINE_PREVIOUS, "{", 5),
};
-
+
Configuration checkConfig = builder.getCheckConfig("LeftCurly");
String filePath = builder.getFilePath("LeftCurlyInput_Annotations");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
-
+
@Test
public void leftCurlyMethodsTest() throws Exception {
@@ -107,7 +107,7 @@ public class LeftCurlyRightCurlyTest extends BaseCheckTestSupport {
Configuration checkConfig = builder.getCheckConfig("LeftCurly");
String filePath = builder.getFilePath("LeftCurlyInput_Method");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 d7d740bd8..b77f74423 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
@@ -29,10 +29,10 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheck;
-public class EmptyBlockTest extends BaseCheckTestSupport{
-
+public class EmptyBlockTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -40,7 +40,7 @@ public class EmptyBlockTest extends BaseCheckTestSupport{
@Test
public void emptyBlockTest() throws Exception {
-
+
final String[] expected = {
"19:21: " + getCheckMessage(EmptyBlockCheck.class, "block.empty", "if"),
"22:34: " + getCheckMessage(EmptyBlockCheck.class, "block.empty", "if"),
@@ -79,14 +79,14 @@ public class EmptyBlockTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("EmptyBlock");
String filePath = builder.getFilePath("EmptyBlockInput_Basic");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
-
+
@Test
public void emptyBlockTestCatch() throws Exception {
-
+
final String[] expected = {
"29:17: " + getCheckMessage(EmptyBlockCheck.class, "block.empty", "finally"),
"50:21: " + getCheckMessage(EmptyBlockCheck.class, "block.empty", "finally"),
@@ -95,7 +95,7 @@ public class EmptyBlockTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("EmptyBlock");
String filePath = builder.getFilePath("EmptyBlockInputCatch");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 e4353fa5e..1f83236d0 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
@@ -30,8 +30,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.blocks.EmptyCatchBlockCheck;
-public class EmptyCatchBlockTest extends BaseCheckTestSupport
-{
+public class EmptyCatchBlockTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@BeforeClass
@@ -42,7 +41,7 @@ public class EmptyCatchBlockTest extends BaseCheckTestSupport
@Test
public void emptyBlockTestCatch() throws Exception
{
-
+
final String[] expected = {
"28: " + getCheckMessage(EmptyCatchBlockCheck.class, "catch.block.empty"),
"49: " + getCheckMessage(EmptyCatchBlockCheck.class, "catch.block.empty"),
@@ -51,7 +50,7 @@ public class EmptyCatchBlockTest extends BaseCheckTestSupport
Configuration checkConfig = builder.getCheckConfig("EmptyCatchBlock");
String filePath = builder.getFilePath("EmptyBlockInputCatch");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
@@ -59,12 +58,12 @@ public class EmptyCatchBlockTest extends BaseCheckTestSupport
@Test
public void testNoViolations() throws Exception
{
-
+
final String[] expected = ArrayUtils.EMPTY_STRING_ARRAY;
Configuration checkConfig = builder.getCheckConfig("EmptyCatchBlock");
String filePath = builder.getFilePath("EmptyCatchBlockNoViolationsInput");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
@@ -72,7 +71,7 @@ public class EmptyCatchBlockTest extends BaseCheckTestSupport
@Test
public void testViolationsByComment() throws Exception
{
-
+
final String[] expected = {
"19: " + getCheckMessage(EmptyCatchBlockCheck.class, "catch.block.empty"),
"27: " + getCheckMessage(EmptyCatchBlockCheck.class, "catch.block.empty"),
@@ -80,7 +79,7 @@ public class EmptyCatchBlockTest extends BaseCheckTestSupport
Configuration checkConfig = builder.getCheckConfig("EmptyCatchBlock");
String filePath = builder.getFilePath("EmptyCatchBlockViolationsByCommentInput");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
@@ -97,7 +96,7 @@ public class EmptyCatchBlockTest extends BaseCheckTestSupport
Configuration checkConfig = builder.getCheckConfig("EmptyCatchBlock");
String filePath = builder.getFilePath("EmptyCatchBlockViolationsByVariableNameInput");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 dc60c0746..a67c37559 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
@@ -29,7 +29,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.coding.OneStatementPerLineCheck;
-public class OneStatementPerLineTest extends BaseCheckTestSupport{
+public class OneStatementPerLineTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule44cloumunlimit/LineLengthTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule44cloumunlimit/LineLengthTest.java
index b0bbeec0c..2c7075349 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule44cloumunlimit/LineLengthTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule44cloumunlimit/LineLengthTest.java
@@ -29,10 +29,10 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck;
-public class LineLengthTest extends BaseCheckTestSupport{
-
+public class LineLengthTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -40,7 +40,7 @@ public class LineLengthTest extends BaseCheckTestSupport{
@Test
public void lineLengthTest() throws Exception {
-
+
final String[] expected = {
"5: " + getCheckMessage(LineLengthCheck.class, "maxLineLen", 100, 112),
"29: " + getCheckMessage(LineLengthCheck.class, "maxLineLen", 100, 183),
@@ -54,7 +54,7 @@ public class LineLengthTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("LineLength");
String filePath = builder.getFilePath("LineLengthInput2");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreack/MethodParamPadTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreack/MethodParamPadTest.java
index e9d09280a..6a1d8bb27 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreack/MethodParamPadTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreack/MethodParamPadTest.java
@@ -29,10 +29,10 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.whitespace.MethodParamPadCheck;
-public class MethodParamPadTest extends BaseCheckTestSupport{
-
+public class MethodParamPadTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -40,7 +40,7 @@ public class MethodParamPadTest extends BaseCheckTestSupport{
@Test
public void operatorWrapTest() throws Exception {
-
+
Class<MethodParamPadCheck> clazz = MethodParamPadCheck.class;
String messageKey = "line.previous";
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreack/OperatorWrapTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreack/OperatorWrapTest.java
index 62cde00bc..ce438646b 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreack/OperatorWrapTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreack/OperatorWrapTest.java
@@ -31,10 +31,10 @@ import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.whitespace.OperatorWrapCheck;
import com.puppycrawl.tools.checkstyle.checks.whitespace.WrapOption;
-public class OperatorWrapTest extends BaseCheckTestSupport{
-
+public class OperatorWrapTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -42,7 +42,7 @@ public class OperatorWrapTest extends BaseCheckTestSupport{
@Test
public void operatorWrapTest() throws Exception {
-
+
Class<OperatorWrapCheck> clazz = OperatorWrapCheck.class;
String messageKey = "line.new";
@@ -74,7 +74,7 @@ public class OperatorWrapTest extends BaseCheckTestSupport{
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
-
+
@Test
public void operatorWrapTestAssign() throws Exception {
DefaultConfiguration newCheckConfig = createCheckConfig(OperatorWrapCheck.class);
@@ -84,7 +84,7 @@ public class OperatorWrapTest extends BaseCheckTestSupport{
+ "BOR_ASSIGN, BAND_ASSIGN");
String messageKey = "line.previous";
Class<OperatorWrapCheck> clazz = OperatorWrapCheck.class;
-
+
final String[] expected = {
"28:13: " + getCheckMessage(clazz, messageKey, "="),
"177:9: " + getCheckMessage(clazz, messageKey, "="),
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreack/SeparatorWrapTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreack/SeparatorWrapTest.java
index f89e5cf85..62856ce6b 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreack/SeparatorWrapTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreack/SeparatorWrapTest.java
@@ -29,10 +29,10 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.whitespace.SeparatorWrapCheck;
-public class SeparatorWrapTest extends BaseCheckTestSupport{
-
+public class SeparatorWrapTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
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 633d4c422..4de968b39 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
@@ -29,7 +29,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck;
-public class EmptyLineSeparatorTest extends BaseCheckTestSupport{
+public class EmptyLineSeparatorTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@@ -40,7 +40,7 @@ public class EmptyLineSeparatorTest extends BaseCheckTestSupport{
@Test
public void emptyLineSeparatorTest() throws Exception {
-
+
Class<EmptyLineSeparatorCheck> clazz = EmptyLineSeparatorCheck.class;
String messageKey = "empty.line.separator";
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 daa42b232..43934015d 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
@@ -29,7 +29,7 @@ import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
-public class WhitespaceAroundTest extends BaseCheckTestSupport{
+public class WhitespaceAroundTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@@ -40,7 +40,7 @@ public class WhitespaceAroundTest extends BaseCheckTestSupport{
@Test
public void whitespaceAroundBasicTest() throws Exception {
-
+
Configuration checkConfig = builder.getCheckConfig("WhitespaceAround");
String msgPreceded = "ws.notPreceded";
String msgFollowed = "ws.notFollowed";
@@ -73,14 +73,14 @@ public class WhitespaceAroundTest extends BaseCheckTestSupport{
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
-
+
@Test
public void whitespaceAroundGenericsTest() throws Exception {
-
+
String msgPreceded = "ws.preceded";
String msgFollowed = "ws.followed";
Configuration checkConfig = builder.getCheckConfig("GenericWhitespace");
-
+
final String[] expected = {
"12:16: " + getCheckMessage(checkConfig.getMessages(), msgPreceded, "<"),
"12:18: " + getCheckMessage(checkConfig.getMessages(), msgFollowed, "<"),
@@ -107,7 +107,7 @@ public class WhitespaceAroundTest extends BaseCheckTestSupport{
}
@Test
public void whitespaceAroundEmptyTypesCyclesTest() throws Exception {
-
+
final String[] expected = ArrayUtils.EMPTY_STRING_ARRAY;
Configuration checkConfig = builder.getCheckConfig("WhitespaceAround");
@@ -116,7 +116,7 @@ public class WhitespaceAroundTest extends BaseCheckTestSupport{
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
-
+
@Test
public void genericWhitespaceTest() throws Exception {
String msgPreceded = "ws.preceded";
@@ -124,8 +124,8 @@ public class WhitespaceAroundTest extends BaseCheckTestSupport{
String msgNotPreceded = "ws.notPreceded";
String msgIllegalFollow = "ws.illegalFollow";
Configuration checkConfig = builder.getCheckConfig("GenericWhitespace");
-
-
+
+
final String[] expected = {
"16:13: " + getCheckMessage(checkConfig.getMessages(), msgPreceded, "<"),
"16:15: " + getCheckMessage(checkConfig.getMessages(), msgFollowed, "<"),
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4821onevariablepreline/MultipleVariableDeclarationsTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4821onevariablepreline/MultipleVariableDeclarationsTest.java
index e90c963d9..574a5ae96 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4821onevariablepreline/MultipleVariableDeclarationsTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4821onevariablepreline/MultipleVariableDeclarationsTest.java
@@ -29,10 +29,10 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.coding.MultipleVariableDeclarationsCheck;
-public class MultipleVariableDeclarationsTest extends BaseCheckTestSupport{
-
+public class MultipleVariableDeclarationsTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -40,7 +40,7 @@ public class MultipleVariableDeclarationsTest extends BaseCheckTestSupport{
@Test
public void multipleVariableDeclarationsTest() throws Exception {
-
+
String msgComma = getCheckMessage(MultipleVariableDeclarationsCheck.class, "multiple.variable.declarations.comma");
String msg = getCheckMessage(MultipleVariableDeclarationsCheck.class, "multiple.variable.declarations");
@@ -69,7 +69,7 @@ public class MultipleVariableDeclarationsTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("MultipleVariableDeclarations");
String filePath = builder.getFilePath("MultipleVariableDeclarationsInput");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 8892ee09d..e51d4ebd7 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
@@ -29,7 +29,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck;
-public class VariableDeclarationUsageDistanceTest extends BaseCheckTestSupport{
+public class VariableDeclarationUsageDistanceTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
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 37475b5f9..613b081da 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
@@ -29,10 +29,10 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.ArrayTypeStyleCheck;
-public class ArrayTypeStyleTest extends BaseCheckTestSupport{
-
+public class ArrayTypeStyleTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -40,7 +40,7 @@ public class ArrayTypeStyleTest extends BaseCheckTestSupport{
@Test
public void arrayTypeStyleTest() throws Exception {
-
+
String msg = getCheckMessage(ArrayTypeStyleCheck.class, "array.type.style");
final String[] expected = {
@@ -51,10 +51,10 @@ public class ArrayTypeStyleTest extends BaseCheckTestSupport{
"41:16: " + msg,
"42:19: " + msg,
};
-
+
Configuration checkConfig = builder.getCheckConfig("ArrayTypeStyle");
String filePath = builder.getFilePath("ArrayTypeStyleInput");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 6265f2461..598be26d7 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
@@ -30,7 +30,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.google.checkstyle.test.base.IndentationConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
-public class IndentationTest extends BaseCheckTestSupport{
+public class IndentationTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4842fallthrow/FallThroughTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4842fallthrow/FallThroughTest.java
index 32ba5712a..0a46d9961 100644
--- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4842fallthrow/FallThroughTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4842fallthrow/FallThroughTest.java
@@ -29,10 +29,10 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.coding.FallThroughCheck;
-public class FallThroughTest extends BaseCheckTestSupport{
-
+public class FallThroughTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -42,10 +42,10 @@ public class FallThroughTest extends BaseCheckTestSupport{
public void fallThroughTest() throws Exception {
String msg = getCheckMessage(FallThroughCheck.class, "fall.through");
-
+
final String[] expected = {
"14:13: " + msg,
- "38:13: " + msg,
+ "38:13: " + msg,
"47:13: " + msg,
"53:13: " + msg,
"70:13: " + msg,
@@ -57,7 +57,7 @@ public class FallThroughTest extends BaseCheckTestSupport{
"372:11: " + msg,
"374:41: " + msg,
};
-
+
Configuration checkConfig = builder.getCheckConfig("FallThrough");
String filePath = builder.getFilePath("FallThroughInput");
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 c6fd16460..41b913457 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
@@ -29,10 +29,10 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck;
-public class MissingSwitchDefaultTest extends BaseCheckTestSupport{
-
+public class MissingSwitchDefaultTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -40,7 +40,7 @@ public class MissingSwitchDefaultTest extends BaseCheckTestSupport{
@Test
public void missingSwitchDefaultTest() throws Exception {
-
+
String msg = getCheckMessage(MissingSwitchDefaultCheck.class, "missing.switch.default");
final String[] expected = {
@@ -51,10 +51,10 @@ public class MissingSwitchDefaultTest extends BaseCheckTestSupport{
"38:21: " + msg,
"42:21: " + msg,
};
-
+
Configuration checkConfig = builder.getCheckConfig("MissingSwitchDefault");
String filePath = builder.getFilePath("MissingSwitchDefaultInput");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 83e239854..e609031d8 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
@@ -29,10 +29,10 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationLocationCheck;
-public class AnnotationLocationTest extends BaseCheckTestSupport{
-
+public class AnnotationLocationTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -40,7 +40,7 @@ public class AnnotationLocationTest extends BaseCheckTestSupport{
@Test
public void annotationTest() throws Exception {
-
+
Class<AnnotationLocationCheck> clazz = AnnotationLocationCheck.class;
getCheckMessage(clazz, "annotation.location.alone");
Configuration checkConfig = builder.getCheckConfig("AnnotationLocation");
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 4efe626a7..8bff50d41 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
@@ -29,10 +29,10 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.modifier.ModifierOrderCheck;
-public class ModifierOrderTest extends BaseCheckTestSupport{
-
+public class ModifierOrderTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -40,7 +40,7 @@ public class ModifierOrderTest extends BaseCheckTestSupport{
@Test
public void modifierOrderTest() throws Exception {
-
+
Class<ModifierOrderCheck> clazz = ModifierOrderCheck.class;
String msgMod = "mod.order";
String msgAnnotation = "annotation.order";
@@ -100,10 +100,10 @@ public class ModifierOrderTest extends BaseCheckTestSupport{
"217:37: " + getCheckMessage(clazz, msgMod, "protected"),
"219:22: " + getCheckMessage(clazz, msgAnnotation, "@MyAnnotation2"),
};
-
+
Configuration checkConfig = builder.getCheckConfig("ModifierOrder");
String filePath = builder.getFilePath("ModifierOrderInput");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 13d6dcbd1..c286b2b02 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
@@ -28,10 +28,10 @@ import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
-public class UpperEllTest extends BaseCheckTestSupport{
-
+public class UpperEllTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -39,7 +39,7 @@ public class UpperEllTest extends BaseCheckTestSupport{
@Test
public void upperEllTest() throws Exception {
-
+
final String[] expected = {
"6:36: Should use uppercase 'L'.",
"12:27: Should use uppercase 'L'.",
@@ -66,10 +66,10 @@ public class UpperEllTest extends BaseCheckTestSupport{
"99:29: Should use uppercase 'L'.",
"100:22: Should use uppercase 'L'.",
};
-
+
Configuration checkConfig = builder.getCheckConfig("UpperEll");
String filePath = builder.getFilePath("InputUpperEll");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter5naming/rule521packagenames/PackageNameTest.java b/src/it/java/com/google/checkstyle/test/chapter5naming/rule521packagenames/PackageNameTest.java
index e14891fec..4ef46b652 100644
--- a/src/it/java/com/google/checkstyle/test/chapter5naming/rule521packagenames/PackageNameTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter5naming/rule521packagenames/PackageNameTest.java
@@ -30,14 +30,13 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
-public class PackageNameTest extends BaseCheckTestSupport{
+public class PackageNameTest extends BaseCheckTestSupport {
private static final String MSG_KEY = "name.invalidPattern";
private static ConfigurationBuilder builder;
private static Configuration checkConfig;
private static String format;
-
@BeforeClass
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 62523f0bb..6fdddc6f1 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
@@ -28,7 +28,7 @@ import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
-public class TypeNameTest extends BaseCheckTestSupport{
+public class TypeNameTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
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 743c68611..b8dc71b1c 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
@@ -28,10 +28,10 @@ import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
-public class MethodNameTest extends BaseCheckTestSupport{
-
+public class MethodNameTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -39,7 +39,7 @@ public class MethodNameTest extends BaseCheckTestSupport{
@Test
public void methodNameTest() throws Exception {
-
+
Configuration checkConfig = builder.getCheckConfig("MethodName");
String msgKey = "name.invalidPattern";
String format = "^[a-z][a-z0-9][a-zA-Z0-9_]*$";
@@ -70,9 +70,9 @@ public class MethodNameTest extends BaseCheckTestSupport{
"49:14: " + getCheckMessage(checkConfig.getMessages(), msgKey, "f", format),
"50:14: " + getCheckMessage(checkConfig.getMessages(), msgKey, "fO", format),
};
-
+
String filePath = builder.getFilePath("InputMethodName");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter5naming/rule525nonconstantfieldnames/MemberNameTest.java b/src/it/java/com/google/checkstyle/test/chapter5naming/rule525nonconstantfieldnames/MemberNameTest.java
index 7ca03113d..4493c0f36 100644
--- a/src/it/java/com/google/checkstyle/test/chapter5naming/rule525nonconstantfieldnames/MemberNameTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter5naming/rule525nonconstantfieldnames/MemberNameTest.java
@@ -29,7 +29,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
-public class MemberNameTest extends BaseCheckTestSupport{
+public class MemberNameTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
private static final String MSG_KEY = "name.invalidPattern";
diff --git a/src/it/java/com/google/checkstyle/test/chapter5naming/rule526parameternames/ParameterNameTest.java b/src/it/java/com/google/checkstyle/test/chapter5naming/rule526parameternames/ParameterNameTest.java
index 695921d10..679f4353f 100644
--- a/src/it/java/com/google/checkstyle/test/chapter5naming/rule526parameternames/ParameterNameTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter5naming/rule526parameternames/ParameterNameTest.java
@@ -29,7 +29,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
-public class ParameterNameTest extends BaseCheckTestSupport{
+public class ParameterNameTest extends BaseCheckTestSupport {
private static final String MSG_KEY = "name.invalidPattern";
private static String format;
diff --git a/src/it/java/com/google/checkstyle/test/chapter5naming/rule527localvariablenames/LocalVariableNameTest.java b/src/it/java/com/google/checkstyle/test/chapter5naming/rule527localvariablenames/LocalVariableNameTest.java
index 90f73292c..21485a160 100644
--- a/src/it/java/com/google/checkstyle/test/chapter5naming/rule527localvariablenames/LocalVariableNameTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter5naming/rule527localvariablenames/LocalVariableNameTest.java
@@ -29,7 +29,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
-public class LocalVariableNameTest extends BaseCheckTestSupport{
+public class LocalVariableNameTest extends BaseCheckTestSupport {
private static final String MSG_KEY = "name.invalidPattern";
private static ConfigurationBuilder builder;
diff --git a/src/it/java/com/google/checkstyle/test/chapter5naming/rule528typevariablenames/ClassMethodTypeParameterNameTest.java b/src/it/java/com/google/checkstyle/test/chapter5naming/rule528typevariablenames/ClassMethodTypeParameterNameTest.java
index f51f0ebba..467e08ceb 100644
--- a/src/it/java/com/google/checkstyle/test/chapter5naming/rule528typevariablenames/ClassMethodTypeParameterNameTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter5naming/rule528typevariablenames/ClassMethodTypeParameterNameTest.java
@@ -29,7 +29,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
-public class ClassMethodTypeParameterNameTest extends BaseCheckTestSupport{
+public class ClassMethodTypeParameterNameTest extends BaseCheckTestSupport {
private static final String MSG_KEY = "name.invalidPattern";
private static ConfigurationBuilder builder;
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 da34f0d52..ecbba2c1d 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
@@ -29,13 +29,13 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.naming.AbbreviationAsWordInNameCheck;
-public class AbbreviationAsWordInNameTest extends BaseCheckTestSupport{
+public class AbbreviationAsWordInNameTest extends BaseCheckTestSupport {
private static final String MSG_KEY = "abbreviation.as.word";
private static ConfigurationBuilder builder;
- private final Class<AbbreviationAsWordInNameCheck> clazz = AbbreviationAsWordInNameCheck.class;
private static Configuration checkConfig;
-
+ private final Class<AbbreviationAsWordInNameCheck> clazz = AbbreviationAsWordInNameCheck.class;
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -61,7 +61,7 @@ public class AbbreviationAsWordInNameTest extends BaseCheckTestSupport{
};
String filePath = builder.getFilePath("InputAbbreviationAsWordInTypeNameCheck");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 64536c11a..68f4a262f 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
@@ -29,10 +29,10 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheck;
-public class EmptyBlockTest extends BaseCheckTestSupport{
-
+public class EmptyBlockTest extends BaseCheckTestSupport {
+
private static ConfigurationBuilder builder;
-
+
@BeforeClass
public static void setConfigurationBuilder() {
builder = new ConfigurationBuilder(new File("src/it/"));
@@ -40,7 +40,7 @@ public class EmptyBlockTest extends BaseCheckTestSupport{
@Test
public void emptyBlockTestCatch() throws Exception {
-
+
final String[] expected = {
"29:17: " + getCheckMessage(EmptyBlockCheck.class, "block.empty", "finally"),
"50:21: " + getCheckMessage(EmptyBlockCheck.class, "block.empty", "finally"),
@@ -49,7 +49,7 @@ public class EmptyBlockTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("EmptyBlock");
String filePath = builder.getFilePath("EmptyBlockInputCatch");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 c83f4290e..587ffb4e7 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
@@ -29,7 +29,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.coding.NoFinalizerCheck;
-public class NoFinalizerTest extends BaseCheckTestSupport{
+public class NoFinalizerTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@@ -40,7 +40,7 @@ public class NoFinalizerTest extends BaseCheckTestSupport{
@Test
public void noFinalizerBasicTest() throws Exception {
-
+
String msg = getCheckMessage(NoFinalizerCheck.class, "avoid.finalizer.method");
final String[] expected = {
@@ -49,14 +49,14 @@ public class NoFinalizerTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("NoFinalizer");
String filePath = builder.getFilePath("NoFinalizerInput");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
-
+
@Test
public void noFinalizerExtendedTest() throws Exception {
-
+
String msg = getCheckMessage(NoFinalizerCheck.class, "avoid.finalizer.method");
final String[] expected = {
@@ -73,7 +73,7 @@ public class NoFinalizerTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("NoFinalizer");
String filePath = builder.getFilePath("NoFinalizeExtendInput");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 1d92d378f..a65f99d69 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
@@ -30,7 +30,7 @@ import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.javadoc.SingleLineJavadocCheck;
-public class SingleLineJavadocTest extends BaseCheckTestSupport{
+public class SingleLineJavadocTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@@ -41,7 +41,7 @@ public class SingleLineJavadocTest extends BaseCheckTestSupport{
@Test
public void singleLineJavadocTest() throws Exception {
-
+
String msg = getCheckMessage(SingleLineJavadocCheck.class, "singleline.javadoc");
final String[] expected = {
@@ -57,7 +57,7 @@ public class SingleLineJavadocTest extends BaseCheckTestSupport{
final DefaultConfiguration checkConfig = createCheckConfig(SingleLineJavadocCheck.class);
checkConfig.addAttribute("ignoreInlineTags", "false");
String filePath = builder.getFilePath("InputSingleLineJavadocCheck");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
@@ -65,7 +65,7 @@ public class SingleLineJavadocTest extends BaseCheckTestSupport{
@Test(expected = Exception.class)
public void customInlineTagTest() throws Exception{
String msg = getCheckMessage(SingleLineJavadocCheck.class, "singleline.javadoc");
-
+
Configuration checkConfig = builder.getCheckConfig("SingleLineJavadocCheck");
String filePath = builder.getFilePath("InputSingleLineJavadocCheckError");
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 957fb6027..58050fb28 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
@@ -30,7 +30,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocParagraphCheck;
-public class JavadocParagraphTest extends BaseCheckTestSupport{
+public class JavadocParagraphTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@@ -46,11 +46,11 @@ public class JavadocParagraphTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("JavadocParagraph");
String filePath = builder.getFilePath("InputCorrectJavadocParagraphCheck");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
-
+
@Test
public void javadocParagraphIncorrectTest() throws Exception {
@@ -93,7 +93,7 @@ public class JavadocParagraphTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("JavadocParagraph");
String filePath = builder.getFilePath("InputIncorrectJavadocParagraphCheck");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 ea60a4937..5b017532a 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
@@ -30,7 +30,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.javadoc.AtclauseOrderCheck;
-public class AtclauseOrderTest extends BaseCheckTestSupport{
+public class AtclauseOrderTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@@ -46,11 +46,11 @@ public class AtclauseOrderTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("AtclauseOrder");
String filePath = builder.getFilePath("InputCorrectAtClauseOrderCheck");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
-
+
@Test
public void testIncorrect() throws Exception {
final String tagOrder = "[@param, @return, @throws, @deprecated]";
@@ -88,7 +88,7 @@ public class AtclauseOrderTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("AtclauseOrder");
String filePath = builder.getFilePath("InputIncorrectAtClauseOrderCheck");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
diff --git a/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule713atclauses/JavadocTagContinuationIndentationTest.java b/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule713atclauses/JavadocTagContinuationIndentationTest.java
index 4279e47d8..1e76df571 100644
--- a/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule713atclauses/JavadocTagContinuationIndentationTest.java
+++ b/src/it/java/com/google/checkstyle/test/chapter7javadoc/rule713atclauses/JavadocTagContinuationIndentationTest.java
@@ -28,12 +28,12 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTagContinuationIndentationCheck;
-public class JavadocTagContinuationIndentationTest extends BaseCheckTestSupport{
+public class JavadocTagContinuationIndentationTest extends BaseCheckTestSupport {
@Test
public void testWithDefaultConfiguration() throws Exception {
- ConfigurationBuilder builder = new ConfigurationBuilder(new File("src/it/"));
- String msg = getCheckMessage(JavadocTagContinuationIndentationCheck.class,
+ final ConfigurationBuilder builder = new ConfigurationBuilder(new File("src/it/"));
+ final String msg = getCheckMessage(JavadocTagContinuationIndentationCheck.class,
"tag.continuation.indent", 4);
final String[] expected = {
@@ -53,7 +53,7 @@ public class JavadocTagContinuationIndentationTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("JavadocTagContinuationIndentation");
String filePath = builder.getFilePath("InputJavaDocTagContinuationIndentation");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 50238357b..0c090c64e 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
@@ -29,7 +29,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.javadoc.NonEmptyAtclauseDescriptionCheck;
-public class NonEmptyAtclauseDescriptionTest extends BaseCheckTestSupport{
+public class NonEmptyAtclauseDescriptionTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@@ -58,7 +58,7 @@ public class NonEmptyAtclauseDescriptionTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("NonEmptyAtclauseDescription");
String filePath = builder.getFilePath("InputNonEmptyAtclauseDescriptionCheck");
-
+
Integer[] warnList = getLineNumbersFromExpected(expected);
verify(checkConfig, filePath, expected, warnList);
}
@@ -78,7 +78,7 @@ public class NonEmptyAtclauseDescriptionTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("NonEmptyAtclauseDescription");
String filePath = builder.getFilePath("InputNonEmptyAtclauseDescriptionCheckSpaceSeq");
-
+
Integer[] warnList = getLineNumbersFromExpected(expected);
verify(checkConfig, filePath, expected, warnList);
}
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 e32dd8159..71951b2d1 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
@@ -30,7 +30,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.javadoc.SummaryJavadocCheck;
-public class SummaryJavadocTest extends BaseCheckTestSupport{
+public class SummaryJavadocTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;
@@ -41,19 +41,19 @@ public class SummaryJavadocTest extends BaseCheckTestSupport{
@Test
public void testCorrect() throws Exception {
-
+
final String[] expected = ArrayUtils.EMPTY_STRING_ARRAY;
Configuration checkConfig = builder.getCheckConfig("SummaryJavadocCheck");
String filePath = builder.getFilePath("InputCorrectSummaryJavaDocCheck");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
@Test
public void testIncorrect() throws Exception {
-
+
String msgFirstSentence = getCheckMessage(SummaryJavadocCheck.class, "summary.first.sentence");
String msgForbiddenFragment = getCheckMessage(SummaryJavadocCheck.class, "summary.javaDoc");
@@ -69,7 +69,7 @@ public class SummaryJavadocTest extends BaseCheckTestSupport{
Configuration checkConfig = builder.getCheckConfig("SummaryJavadocCheck");
String filePath = builder.getFilePath("InputIncorrectSummaryJavaDocCheck");
-
+
Integer[] warnList = builder.getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
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 629a4abc9..696d11a8e 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
@@ -29,7 +29,7 @@ import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck;
-public class JavadocMethodTest extends BaseCheckTestSupport{
+public class JavadocMethodTest extends BaseCheckTestSupport {
private static ConfigurationBuilder builder;