diff --git a/docs/config_coding.html b/docs/config_coding.html index 9ebc400fb..ed3885416 100644 --- a/docs/config_coding.html +++ b/docs/config_coding.html @@ -98,7 +98,7 @@

Package

- com.puppycrawl.tools.checkstyle.checks + com.puppycrawl.tools.checkstyle.checks.coding

Parent Module

@@ -128,7 +128,7 @@ String b = (a==null || a.length<1) ? null : a.substring(1);

Package

- com.puppycrawl.tools.checkstyle.checks + com.puppycrawl.tools.checkstyle.checks.coding

Parent Module

@@ -178,7 +178,7 @@ public class MySingleton

Package

- com.puppycrawl.tools.checkstyle.checks + com.puppycrawl.tools.checkstyle.checks.coding

Parent Module

@@ -198,7 +198,7 @@ public class MySingleton

Package

- com.puppycrawl.tools.checkstyle.checks + com.puppycrawl.tools.checkstyle.checks.coding

Parent Module

@@ -228,7 +228,7 @@ public class MySingleton

Package

- com.puppycrawl.tools.checkstyle.checks + com.puppycrawl.tools.checkstyle.checks.coding

Parent Module

@@ -294,7 +294,7 @@ public class MySingleton

Package

- com.puppycrawl.tools.checkstyle.checks + com.puppycrawl.tools.checkstyle.checks.coding

Parent Module

@@ -351,7 +351,7 @@ public class MySingleton

Package

- com.puppycrawl.tools.checkstyle.checks + com.puppycrawl.tools.checkstyle.checks.coding

Parent Module

@@ -424,7 +424,7 @@ public class MySingleton

Package

- com.puppycrawl.tools.checkstyle.checks + com.puppycrawl.tools.checkstyle.checks.coding

Parent Module

@@ -478,7 +478,7 @@ public class MySingleton

Package

- com.puppycrawl.tools.checkstyle.checks + com.puppycrawl.tools.checkstyle.checks.coding

Parent Module

@@ -506,7 +506,7 @@ public class MySingleton

Package

- com.puppycrawl.tools.checkstyle.checks + com.puppycrawl.tools.checkstyle.checks.coding

Parent Module

@@ -558,7 +558,7 @@ public class MySingleton

Package

- com.puppycrawl.tools.checkstyle.checks + com.puppycrawl.tools.checkstyle.checks.coding

Parent Module

@@ -583,7 +583,7 @@ public class MySingleton

Package

- com.puppycrawl.tools.checkstyle.checks + com.puppycrawl.tools.checkstyle.checks.coding

Parent Module

@@ -619,7 +619,7 @@ return !valid();

Package

- com.puppycrawl.tools.checkstyle.checks + com.puppycrawl.tools.checkstyle.checks.coding

Parent Module

diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/ArrayTrailingCommaCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/ArrayTrailingCommaCheck.java similarity index 97% rename from src/checkstyle/com/puppycrawl/tools/checkstyle/checks/ArrayTrailingCommaCheck.java rename to src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/ArrayTrailingCommaCheck.java index eb2db6e24..ecf08294e 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/ArrayTrailingCommaCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/ArrayTrailingCommaCheck.java @@ -16,7 +16,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //////////////////////////////////////////////////////////////////////////////// -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.api.Check; import com.puppycrawl.tools.checkstyle.api.TokenTypes; diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/AvoidInlineConditionalsCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/AvoidInlineConditionalsCheck.java similarity index 96% rename from src/checkstyle/com/puppycrawl/tools/checkstyle/checks/AvoidInlineConditionalsCheck.java rename to src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/AvoidInlineConditionalsCheck.java index ce117dccd..dd5531b9a 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/AvoidInlineConditionalsCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/AvoidInlineConditionalsCheck.java @@ -16,7 +16,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //////////////////////////////////////////////////////////////////////////////// -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.api.Check; import com.puppycrawl.tools.checkstyle.api.TokenTypes; @@ -35,7 +35,7 @@ import com.puppycrawl.tools.checkstyle.api.DetailAST; * so their company's coding standards forbids them. * * @author lkuehne - * @version $Revision: 1.4 $ + * @version $Revision: 1.1 $ */ public class AvoidInlineConditionalsCheck extends Check { diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/DoubleCheckedLockingCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/DoubleCheckedLockingCheck.java similarity index 98% rename from src/checkstyle/com/puppycrawl/tools/checkstyle/checks/DoubleCheckedLockingCheck.java rename to src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/DoubleCheckedLockingCheck.java index c9af5082a..75d2df5a6 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/DoubleCheckedLockingCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/DoubleCheckedLockingCheck.java @@ -16,7 +16,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //////////////////////////////////////////////////////////////////////////////// -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import antlr.collections.AST; import com.puppycrawl.tools.checkstyle.api.Check; diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/EmptyStatementCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/EmptyStatementCheck.java similarity index 97% rename from src/checkstyle/com/puppycrawl/tools/checkstyle/checks/EmptyStatementCheck.java rename to src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/EmptyStatementCheck.java index eae19c47c..6e2ea0cea 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/EmptyStatementCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/EmptyStatementCheck.java @@ -17,7 +17,7 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //////////////////////////////////////////////////////////////////////////////// -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.api.Check; import com.puppycrawl.tools.checkstyle.api.TokenTypes; diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/EqualsHashCodeCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/EqualsHashCodeCheck.java similarity index 98% rename from src/checkstyle/com/puppycrawl/tools/checkstyle/checks/EqualsHashCodeCheck.java rename to src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/EqualsHashCodeCheck.java index 90d700d02..582407e73 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/EqualsHashCodeCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/EqualsHashCodeCheck.java @@ -17,7 +17,7 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //////////////////////////////////////////////////////////////////////////////// -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import java.util.HashMap; import java.util.HashSet; diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/HiddenFieldCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java similarity index 99% rename from src/checkstyle/com/puppycrawl/tools/checkstyle/checks/HiddenFieldCheck.java rename to src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java index 09d0ab425..aa9242112 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/HiddenFieldCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java @@ -16,7 +16,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //////////////////////////////////////////////////////////////////////////////// -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import java.util.HashSet; import java.util.Iterator; diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/IllegalInstantiationCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java similarity index 98% rename from src/checkstyle/com/puppycrawl/tools/checkstyle/checks/IllegalInstantiationCheck.java rename to src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java index 38bf187e3..48411de95 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/IllegalInstantiationCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java @@ -17,7 +17,7 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //////////////////////////////////////////////////////////////////////////////// -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import java.util.HashSet; import java.util.Iterator; @@ -28,6 +28,7 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.FullIdent; import com.puppycrawl.tools.checkstyle.api.Utils; +import com.puppycrawl.tools.checkstyle.checks.AbstractImportCheck; import antlr.collections.AST; // TODO: Clean up potential duplicate code here and in UnusedImportsCheck diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/InnerAssignmentCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheck.java similarity index 98% rename from src/checkstyle/com/puppycrawl/tools/checkstyle/checks/InnerAssignmentCheck.java rename to src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheck.java index 5675d66b0..a1343a2f4 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/InnerAssignmentCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheck.java @@ -17,7 +17,7 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //////////////////////////////////////////////////////////////////////////////// -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.api.Check; import com.puppycrawl.tools.checkstyle.api.TokenTypes; diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/MagicNumberCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheck.java similarity index 99% rename from src/checkstyle/com/puppycrawl/tools/checkstyle/checks/MagicNumberCheck.java rename to src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheck.java index 9f7ee224e..485be927e 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/MagicNumberCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheck.java @@ -16,7 +16,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //////////////////////////////////////////////////////////////////////////////// -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.api.Check; import com.puppycrawl.tools.checkstyle.api.DetailAST; diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/MissingSwitchDefaultCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/MissingSwitchDefaultCheck.java old mode 100755 new mode 100644 similarity index 97% rename from src/checkstyle/com/puppycrawl/tools/checkstyle/checks/MissingSwitchDefaultCheck.java rename to src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/MissingSwitchDefaultCheck.java index 637f0c48c..69ba5b320 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/MissingSwitchDefaultCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/MissingSwitchDefaultCheck.java @@ -16,7 +16,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //////////////////////////////////////////////////////////////////////////////// -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.api.Check; import com.puppycrawl.tools.checkstyle.api.DetailAST; diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/RedundantThrowsCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/RedundantThrowsCheck.java similarity index 98% rename from src/checkstyle/com/puppycrawl/tools/checkstyle/checks/RedundantThrowsCheck.java rename to src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/RedundantThrowsCheck.java index dcb5a76cf..386a1d9d3 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/RedundantThrowsCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/RedundantThrowsCheck.java @@ -16,12 +16,14 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //////////////////////////////////////////////////////////////////////////////// -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.FullIdent; import com.puppycrawl.tools.checkstyle.api.TokenTypes; import com.puppycrawl.tools.checkstyle.api.Utils; +import com.puppycrawl.tools.checkstyle.checks.AbstractImportCheck; +import com.puppycrawl.tools.checkstyle.checks.ClassResolver; import java.util.LinkedList; import java.util.List; diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/SimplifyBooleanExpressionCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanExpressionCheck.java similarity index 98% rename from src/checkstyle/com/puppycrawl/tools/checkstyle/checks/SimplifyBooleanExpressionCheck.java rename to src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanExpressionCheck.java index 217e4097a..bb01891ec 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/SimplifyBooleanExpressionCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanExpressionCheck.java @@ -16,7 +16,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //////////////////////////////////////////////////////////////////////////////// -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.api.Check; import com.puppycrawl.tools.checkstyle.api.TokenTypes; diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/SimplifyBooleanReturnCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanReturnCheck.java similarity index 98% rename from src/checkstyle/com/puppycrawl/tools/checkstyle/checks/SimplifyBooleanReturnCheck.java rename to src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanReturnCheck.java index 452d14830..bece5c38d 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/SimplifyBooleanReturnCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanReturnCheck.java @@ -17,7 +17,7 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //////////////////////////////////////////////////////////////////////////////// -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import antlr.collections.AST; import com.puppycrawl.tools.checkstyle.api.Check; diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages.properties b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages.properties new file mode 100644 index 000000000..b047f07fb --- /dev/null +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages.properties @@ -0,0 +1,25 @@ +array.trailing.comma=Array should contain trailing comma. + +assignment.inner.avoid=Inner assignments should be avoided. + +doublechecked.locking.avoid=The double-checked locking idiom is broken and should be avoided. + +empty.statement=Empty statement. + +equals.noHashCode=Definition of ''equals()'' without corresponding definition of ''hashCode()''. + +hidden.field=''{0}'' hides a field. + +instantiation.avoid=Instantiation of {0} should be avoided. + +magic.number=''{0}'' is a magic number. + +missing.switch.default=switch without \"default\" clause. + +redundant.throws.classInfo=Unable to get class information for {0}. +redundant.throws.duplicate=Redundant throws: ''{0}'' listed more then one time. +redundant.throws.subclass=Redundant throws: ''{0}'' is subclass of ''{1}''. +redundant.throws.unchecked=Redundant throws: ''{0}'' is unchecked exception. + +simplify.boolreturn=Conditional logic can be removed. +simplify.expression=Expression can be simplified. diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages_de.properties b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages_de.properties new file mode 100644 index 000000000..6d34453dc --- /dev/null +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages_de.properties @@ -0,0 +1,14 @@ +assignment.inner.avoid=Innere Zuweisungen sollten vermieden werden. +doublechecked.locking.avoid=Das ''double-checked locking'' Idiom sollte vermieden werden. +empty.statement=Leere Anweisung. +equals.noHashCode=Definition von ''equals()'' ohne korrespondierende Definition von ''hashCode()''. +hidden.field=''{0}'' verbirgt ein Feld. +instantiation.avoid=Instantiierung von {0} sollte vermieden werden. +magic.number=''{0}'' sollte durch eine Konstante definiert sein. +missing.switch.default=switch ohne \"default\". +redundant.throws.classInfo=Klassen-Information für {0} nicht verfügbar. +redundant.throws.duplicate=Überflüssige throws Deklaration: ''{0}'' ist mehrfach aufgeführt. +redundant.throws.subclass=Überflüssige throws Deklaration: ''{0}'' ist Unterklasse von ''{1}''. +redundant.throws.unchecked=Überflüssige throws Deklaration: ''{0}'' ist eine unchecked Exception (abgeleitet von RuntimeException). +simplify.boolreturn=Die Verzweigung sollte entfernt werden. +simplify.expression=Der Ausdruck kann vereinfacht werden. diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages_fi.properties b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages_fi.properties new file mode 100644 index 000000000..8d12b4d60 --- /dev/null +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages_fi.properties @@ -0,0 +1,6 @@ +assignment.inner.avoid=Älä käytä sisäkkäisiä sijoituksia. +equals.noHashCode=''equals()'' määritelty ilman vastaavaa ''hashCode()''-määrittelyä. +hidden.field=''{0}'' piilottaa muuttujan. +instantiation.avoid=Älä instantioi {0}:a. +simplify.boolreturn=Konditionaalilogiikan voisi poistaa. +simplify.expression=Ilmaisua voisi yksinkertaistaa. diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages_fr.properties b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages_fr.properties new file mode 100644 index 000000000..f5cd9c8df --- /dev/null +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages_fr.properties @@ -0,0 +1,6 @@ +assignment.inner.avoid=Eviter les assignements internes. +equals.noHashCode=Définition de la méthode ''equals()'' sans définition de méthode ''hashCode()"" correspondante. +hidden.field=''{0}'' cache un champ. +instantiation.avoid=Evitez l''instanciation de la classe {0}. +simplify.boolreturn=Supprimez la logique conditionnelle. +simplify.expression=L'expression peut-être simplifiée. diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages_ja.properties b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages_ja.properties new file mode 100644 index 000000000..82e316256 --- /dev/null +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages_ja.properties @@ -0,0 +1,14 @@ +assignment.inner.avoid=¼°ÆâÉô¤Ç¤ÎÂåÆþ¤ÏÈò¤±¤ë¤Ù¤­¤Ç¤¹¡£ +doublechecked.locking.avoid=double-checked locking ¥¤¥Ç¥£¥ª¥à¤ÏÉÔ½½Ê¬¤Ê¤â¤Î¤Ç¤¢¤ê¡¢Èò¤±¤ë¤Ù¤­¤Ç¤¹¡£ +empty.statement=¶õ¤Îʸ¤Ç¤¹¡£ +equals.noHashCode=''equals()'' ¤òÄêµÁ¤·¤Æ¤¤¤Þ¤¹¤¬¡¢¤³¤ì¤ËÂбþ¤¹¤ë ''hashCode()'' ¤ÎÄêµÁ¤¬¤¢¤ê¤Þ¤»¤ó¡£ +hidden.field=''{0}'' ¤¬¥Õ¥£¡¼¥ë¥É¤ò±£¤·¤Æ¤¤¤Þ¤¹¡£ +instantiation.avoid={0} ¤Î¥¤¥ó¥¹¥¿¥ó¥¹²½¤ÏÈò¤±¤ë¤Ù¤­¤Ç¤¹¡£ +magic.number=''{0}'' ¤Ï¥Þ¥¸¥Ã¥¯¥Ê¥ó¥Ð¡¼¤Ç¤¹¡£ +missing.switch.default=\"default\" Àá¤Î̵¤¤ switch ʸ¤Ç¤¹¡£ +redundant.throws.classInfo={0} ¤Î¥¯¥é¥¹¾ðÊ󤬼èÆÀ¤Ç¤­¤Þ¤»¤ó¡£ +redundant.throws.duplicate=¾éĹ¤Ê throws: ''{0}'' ¤¬½ÅÊ£¤·¤Æ¤¤¤Þ¤¹¡£ +redundant.throws.subclass=¾éĹ¤Ê throws: ''{0}'' ¤Ï ''{1}'' ¤Î¥µ¥Ö¥¯¥é¥¹¤Ç¤¹¡£ +redundant.throws.unchecked=¾éĹ¤Ê throws: ''{0}'' ¤Ï¥Á¥§¥Ã¥¯¤µ¤ì¤Ê¤¤Îã³°¤Ç¤¹¡£ +simplify.boolreturn=¾ò·ï¥í¥¸¥Ã¥¯¤Ï¤Ê¤¯¤»¤Þ¤¹¡£ +simplify.expression=ɽ¸½¤Ï´Ê·é¤Ë¤Ç¤­¤Þ¤¹¡£ diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages_pt.properties b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages_pt.properties new file mode 100644 index 000000000..3ebea98a4 --- /dev/null +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/messages_pt.properties @@ -0,0 +1,14 @@ +assignment.inner.avoid=As atribuições internas devem ser evitadas. +doublechecked.locking.avoid=O método de sincronização com verificação dupla não funciona e deve ser evitado. +empty.statement=Declaração vazia. +equals.noHashCode=Definição de ''equals()'' sem a definição de ''hashCode()''. +hidden.field=''{0}'' esconde um campo. +instantiation.avoid=A instanciação de {0} deve ser evitada. +magic.number=''{0}'' é um número mágico. +missing.switch.default=switch sem o ramo \"default\". +redundant.throws.classInfo=Não foi possível obter os dados da classe {0}. +redundant.throws.duplicate=throws redundante: ''{0}'' listado mais do que uma vez. +redundant.throws.subclass=throws redundante: ''{0}'' é uma sub-classe de ''{1}''. +redundant.throws.unchecked=throws redundante: ''{0}'' é um excepção não-verificada. +simplify.boolreturn=A lógica condicional deve ser removida. +simplify.expression=Expressão pode ser simplicada. diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/package.html b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/package.html new file mode 100644 index 000000000..fb165fc0a --- /dev/null +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/package.html @@ -0,0 +1,10 @@ + + + + + + +

Contains the Coding checks that are bundled with the main distribution.

+ + + diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages.properties b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages.properties index 2b1388fb3..b9f3284b8 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages.properties +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages.properties @@ -2,50 +2,21 @@ noNewlineAtEOF=File does not end with a newline. redundantModifier=Redundant ''{0}'' modifier. -name.invalidPattern=Name ''{0}'' must match pattern ''{1}''. - -variable.missingJavadoc=Variable ''{0}'' is missing Javadoc. - todo.match=Comment matches to-do format ''{0}''. -instantiation.avoid=Instantiation of {0} should be avoided. - upperEll=Should use uppercase ''L''. header.missing=Missing a header - not enough lines in file. header.mismatch=Line does not match expected header line of ''{0}''. -regexp.parseError=Unable to parse regular expression ''{0}''. - mod.order=''{0}'' modifier out of order with the JLS suggestions. -field.unused=''{0}'' is an unused field. - -assignment.inner.avoid=Inner assignments should be avoided. illegal.regexp=Line matches the illegal pattern ''{0}''. -equals.noHashCode=Definition of ''equals()'' without corresponding definition of ''hashCode()''. -hidden.field=''{0}'' hides a field. translation.missingKey=Key ''{0}'' missing. -simplify.expression=Expression can be simplified. -simplify.boolreturn=Conditional logic can be removed. - -doublechecked.locking.avoid=The double-checked locking idiom is broken and should be avoided. - missing.switch.default=switch without \"default\" clause. -empty.statement=Empty statement. - -magic.number=''{0}'' is a magic number. - -redundant.throws.classInfo=Unable to get class information for {0}. -redundant.throws.subclass=Redundant throws: ''{0}'' is subclass of ''{1}''. -redundant.throws.duplicate=Redundant throws: ''{0}'' listed more then one time. -redundant.throws.unchecked=Redundant throws: ''{0}'' is unchecked exception. - -array.trailing.comma=Array should contain trailing comma. - uncommented.main=Uncommented main method found. diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_de.properties b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_de.properties index 1e2eb402c..df0b83bab 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_de.properties +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_de.properties @@ -3,46 +3,20 @@ noNewlineAtEOF=Datei endet nicht mit einem Zeilenumbruch. redundantModifier=Überflüssiger ''{0}'' modifier. -name.invalidPattern=''{0}'' entspricht nicht dem Pattern ''{1}''. - -variable.missingJavadoc=Variable ''{0}'' ist nicht dokumentiert. - todo.match=Kommentar entspricht to-do Format ''{0}''. -instantiation.avoid=Instantiierung von {0} sollte vermieden werden. - upperEll=Zur besseren Lesbarkeit sollte ein großes ''L'' verwendet werden. header.missing=Header fehlt - Datei hat nicht genug Zeilen. header.mismatch=Zeile entspricht nicht der erwarteten Header-Zeile ''{0}''. -regexp.parseError=''{0}'' ist kein regulärer Ausdruck. - mod.order=''{0}'' Modifier weicht von der empfohlenen Modifier-Reihenfolge aus der Java Sprachdefinition ab. -field.unused=Das Feld ''{0}'' wird nicht benutzt. - -assignment.inner.avoid=Innere Zuweisungen sollten vermieden werden. illegal.regexp=Die Zeile entspricht dem verbotenen Muster ''{0}''. -equals.noHashCode=Definition von ''equals()'' ohne korrespondierende Definition von ''hashCode()''. -hidden.field=''{0}'' verbirgt ein Feld. translation.missingKey=Übersetzung für Schlüssel ''{0}'' fehlt. -simplify.expression=Der Ausdruck kann vereinfacht werden. -simplify.boolreturn=Die Verzweigung sollte entfernt werden. - -doublechecked.locking.avoid=Das ''double-checked locking'' Idiom sollte vermieden werden. - missing.switch.default=switch ohne \"default\". -empty.statement=Leere Anweisung. - -magic.number=''{0}'' sollte durch eine Konstante definiert sein. - -redundant.throws.classInfo=Klassen-Information für {0} nicht verfügbar. -redundant.throws.subclass=Überflüssige throws Deklaration: ''{0}'' ist Unterklasse von ''{1}''. -redundant.throws.duplicate=Überflüssige throws Deklaration: ''{0}'' ist mehrfach aufgeführt. -redundant.throws.unchecked=Überflüssige throws Deklaration: ''{0}'' ist eine unchecked Exception (abgeleitet von RuntimeException). diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_fi.properties b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_fi.properties index 7b56b096f..32d25250d 100755 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_fi.properties +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_fi.properties @@ -2,33 +2,18 @@ noNewlineAtEOF=File does not end with a newline. redundantModifier=Tarpeeton määrite: ''{0}'' -name.invalidPattern=Nimen ''{0}'' pitää olla mallin ''{1}'' mukainen. - -variable.missingJavadoc=Muuttujan ''{0}'' Javadoc puuttuu. - todo.match=Kommentti on to-do formaatin ''{0}'' mukainen. -instantiation.avoid=Älä instantioi {0}:a. - upperEll=Pitää olla iso ''L''. header.missing=Headeri puuttuu - ei riittävästi rivejä tiedostossa. header.mismatch=Rivi ei ole odotetun ''{0}'' headerin mukainen. -regexp.parseError=Unable to parse regular expression ''{0}''. - mod.order=''{0}'' määrite rikkoo JLS:n suositusten mukaisesen järjestyksen. -field.unused=''{0}'' on käyttämätön muuttuja. - -assignment.inner.avoid=Älä käytä sisäkkäisiä sijoituksia. illegal.regexp=Rivi on sääntöjenvaistaisen mallin mukainen: ''{0}''. -equals.noHashCode=''equals()'' määritelty ilman vastaavaa ''hashCode()''-määrittelyä. -hidden.field=''{0}'' piilottaa muuttujan. translation.missingKey=Käännösavain ''{0}'' puuttuu. -simplify.expression=Ilmaisua voisi yksinkertaistaa. -simplify.boolreturn=Konditionaalilogiikan voisi poistaa. diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_fr.properties b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_fr.properties index 1e561a88b..25f94ce9e 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_fr.properties +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_fr.properties @@ -2,34 +2,19 @@ noNewlineAtEOF=File does not end with a newline. redundantModifier=Modifieur ''{0}'' redondant. -name.invalidPattern=Le nom ''{0}'' ne respecte pas la règle ''{1}''. - -variable.missingJavadoc=Il manque un commentaire javadoc pour la variable ''{0}'' - todo.match=Le commentaire correspond au format des TODO ''{0}''. -instantiation.avoid=Evitez l''instanciation de la classe {0}. - upperEll=Utilisez un L majuscule pour les constantes de type long. header.missing=En-tête manquant - Pas assez de lignes dans le fichier. header.mismatch=La ligne ne correspond pas à la ligne d''en-tête attendu ''{0}''. -regexp.parseError=Impossible d''analyser cette expression régulière ''{0}''. - mod.order=Le modifieur ''{0}'' n''est pas dans l''ordre suggéré par les JLS. -field.unused=''{0}'' est inutilisé. - -assignment.inner.avoid=Eviter les assignements internes. illegal.regexp=La ligne correspond au motif illégal : ""{0}"". -equals.noHashCode=Définition de la méthode ''equals()'' sans définition de méthode ''hashCode()"" correspondante. -hidden.field=''{0}'' cache un champ. translation.missingKey=Clef ''{0}'' manquante. -simplify.expression=L'expression peut-être simplifiée. -simplify.boolreturn=Supprimez la logique conditionnelle. diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_ja.properties b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_ja.properties index 7a5026a9f..cbc10aab6 100755 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_ja.properties +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_ja.properties @@ -2,47 +2,20 @@ noNewlineAtEOF= redundantModifier=¾éĹ¤Ê ''{0}'' ½¤¾þ»Ò¤Ç¤¹¡£ -name.invalidPattern=̾Á° ''{0}'' ¤Ï¥Ñ¥¿¡¼¥ó ''{1}'' ¤Ë¹çÃפ·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ - - -variable.missingJavadoc=ÊÑ¿ô ''{0}'' ¤Ë Javadoc ¤¬¤¢¤ê¤Þ¤»¤ó¡£ - todo.match=¥³¥á¥ó¥È¤¬ to-do ¤Î·Á¼° ''{0}'' ¤Ë¹çÃפ·¤Æ¤¤¤Þ¤¹¡£ -instantiation.avoid={0} ¤Î¥¤¥ó¥¹¥¿¥ó¥¹²½¤ÏÈò¤±¤ë¤Ù¤­¤Ç¤¹¡£ - upperEll=Âçʸ»ú¤Î ''L'' ¤ò»ÈÍѤ¹¤Ù¤­¤Ç¤¹¡£ header.missing=¥Ø¥Ã¥À¤¬¤¢¤ê¤Þ¤»¤ó - ¥Õ¥¡¥¤¥ë¤Î¹Ô¿ô¤¬ÉÔ­¤·¤Æ¤¤¤Þ¤¹¡£ header.mismatch=¹Ô¤¬´üÂÔ¤µ¤ì¤ë¥Ø¥Ã¥À¹Ô ''{0}'' ¤È¹çÃפ·¤Þ¤»¤ó¡£ -regexp.parseError=Àµµ¬É½¸½ ''{0}'' ¤ò²òÀϤǤ­¤Þ¤»¤ó¡£ - mod.order=''{0}'' ½¤¾þ»Ò¤¬ JLS Äó°Æ¤Î½ç½ø¤Ë±è¤¤¤Þ¤»¤ó¡£ -field.unused=''{0}'' ¤Ï»ÈÍѤµ¤ì¤Ê¤¤¥Õ¥£¡¼¥ë¥É¤Ç¤¹¡£ - -assignment.inner.avoid=¼°ÆâÉô¤Ç¤ÎÂåÆþ¤ÏÈò¤±¤ë¤Ù¤­¤Ç¤¹¡£ illegal.regexp=¹Ô¤¬ÉÔÀµ¤Ê¥Ñ¥¿¡¼¥ó ''{0}'' ¤Ë¹çÃפ·¤Þ¤¹¡£ -equals.noHashCode=''equals()'' ¤òÄêµÁ¤·¤Æ¤¤¤Þ¤¹¤¬¡¢¤³¤ì¤ËÂбþ¤¹¤ë ''hashCode()'' ¤ÎÄêµÁ¤¬¤¢¤ê¤Þ¤»¤ó¡£ -hidden.field=''{0}'' ¤¬¥Õ¥£¡¼¥ë¥É¤ò±£¤·¤Æ¤¤¤Þ¤¹¡£ translation.missingKey=¥­¡¼ ''{0}'' ¤¬¤¢¤ê¤Þ¤»¤ó¡£ -simplify.expression=ɽ¸½¤Ï´Ê·é¤Ë¤Ç¤­¤Þ¤¹¡£ -simplify.boolreturn=¾ò·ï¥í¥¸¥Ã¥¯¤Ï¤Ê¤¯¤»¤Þ¤¹¡£ - -doublechecked.locking.avoid=double-checked locking ¥¤¥Ç¥£¥ª¥à¤ÏÉÔ½½Ê¬¤Ê¤â¤Î¤Ç¤¢¤ê¡¢Èò¤±¤ë¤Ù¤­¤Ç¤¹¡£ - missing.switch.default=\"default\" Àá¤Î̵¤¤ switch ʸ¤Ç¤¹¡£ -empty.statement=¶õ¤Îʸ¤Ç¤¹¡£ - -magic.number=''{0}'' ¤Ï¥Þ¥¸¥Ã¥¯¥Ê¥ó¥Ð¡¼¤Ç¤¹¡£ - -redundant.throws.classInfo={0} ¤Î¥¯¥é¥¹¾ðÊ󤬼èÆÀ¤Ç¤­¤Þ¤»¤ó¡£ -redundant.throws.subclass=¾éĹ¤Ê throws: ''{0}'' ¤Ï ''{1}'' ¤Î¥µ¥Ö¥¯¥é¥¹¤Ç¤¹¡£ -redundant.throws.duplicate=¾éĹ¤Ê throws: ''{0}'' ¤¬½ÅÊ£¤·¤Æ¤¤¤Þ¤¹¡£ -redundant.throws.unchecked=¾éĹ¤Ê throws: ''{0}'' ¤Ï¥Á¥§¥Ã¥¯¤µ¤ì¤Ê¤¤Îã³°¤Ç¤¹¡£ diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_pt.properties b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_pt.properties index f04871f5b..284f0a1c8 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_pt.properties +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/messages_pt.properties @@ -2,47 +2,20 @@ noNewlineAtEOF=File does not end with a newline. redundantModifier=Modificador ''{0}'' é redundante. -name.invalidPattern=Nome ''{0}'' deve condizer com o padrão ''{1}''. - - -variable.missingJavadoc=Falta o Javadoc da variável ''{0}''. - todo.match=O comentário condiz com o padrão de tarefa pendente ''{0}''. -instantiation.avoid=A instanciação de {0} deve ser evitada. - upperEll=Deve ser utilizado um ''L'' maiúsculo. header.missing=Falta o cabeçalho - o ficheiro não tem linhas suficientes. header.mismatch=A linha não condiz com a linha de cabeçalho esperada ''{0}''. -regexp.parseError=Não foi possível processar a expressão regular ''{0}''. - mod.order=Modificador ''{0}'' fora da orderm sugerida pela JLS. -field.unused=''{0}'' é um campo não utilizado. - -assignment.inner.avoid=As atribuições internas devem ser evitadas. illegal.regexp=A linha condiz com o padrão inválido ''{0}''. -equals.noHashCode=Definição de ''equals()'' sem a definição de ''hashCode()''. -hidden.field=''{0}'' esconde um campo. translation.missingKey=Falta a chave ''{0}''. -simplify.expression=Expressão pode ser simplicada. -simplify.boolreturn=A lógica condicional deve ser removida. - -doublechecked.locking.avoid=O método de sincronização com verificação dupla não funciona e deve ser evitado. - missing.switch.default=switch sem o ramo \"default\". -empty.statement=Declaração vazia. - -magic.number=''{0}'' é um número mágico. - -redundant.throws.classInfo=Não foi possível obter os dados da classe {0}. -redundant.throws.subclass=throws redundante: ''{0}'' é uma sub-classe de ''{1}''. -redundant.throws.duplicate=throws redundante: ''{0}'' listado mais do que uma vez. -redundant.throws.unchecked=throws redundante: ''{0}'' é um excepção não-verificada. diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checkstyle_packages.xml b/src/checkstyle/com/puppycrawl/tools/checkstyle/checkstyle_packages.xml index 851c76ad7..5e7bc8198 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checkstyle_packages.xml +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checkstyle_packages.xml @@ -8,6 +8,7 @@ + diff --git a/src/tests/com/puppycrawl/tools/checkstyle/AllTests.java b/src/tests/com/puppycrawl/tools/checkstyle/AllTests.java index 0d85aa3d6..1c0b61af1 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/AllTests.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/AllTests.java @@ -2,27 +2,14 @@ package com.puppycrawl.tools.checkstyle; import com.puppycrawl.tools.checkstyle.api.AbstractViolationReporterTest; import com.puppycrawl.tools.checkstyle.api.DetailASTTest; -import com.puppycrawl.tools.checkstyle.checks.ArrayTrailingCommaCheckTest; import com.puppycrawl.tools.checkstyle.checks.ArrayTypeStyleCheckTest; -import com.puppycrawl.tools.checkstyle.checks.AvoidInlineConditionalsCheckTest; -import com.puppycrawl.tools.checkstyle.checks.DoubleCheckedLockingCheckTest; -import com.puppycrawl.tools.checkstyle.checks.EmptyStatementCheckTest; -import com.puppycrawl.tools.checkstyle.checks.EqualsHashCodeCheckTest; import com.puppycrawl.tools.checkstyle.checks.FileSetCheckLifecycleTest; import com.puppycrawl.tools.checkstyle.checks.FinalParametersCheckTest; import com.puppycrawl.tools.checkstyle.checks.GenericIllegalRegexpCheckTest; import com.puppycrawl.tools.checkstyle.checks.HeaderCheckTest; -import com.puppycrawl.tools.checkstyle.checks.HiddenFieldCheckTest; -import com.puppycrawl.tools.checkstyle.checks.IllegalInstantiationCheckTest; -import com.puppycrawl.tools.checkstyle.checks.InnerAssignmentCheckTest; -import com.puppycrawl.tools.checkstyle.checks.MagicNumberCheckTest; -import com.puppycrawl.tools.checkstyle.checks.MissingSwitchDefaultCheckTest; import com.puppycrawl.tools.checkstyle.checks.ModifierOrderCheckTest; import com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheckTest; import com.puppycrawl.tools.checkstyle.checks.RedundantModifierTest; -import com.puppycrawl.tools.checkstyle.checks.RedundantThrowsCheckTest; -import com.puppycrawl.tools.checkstyle.checks.SimplifyBooleanExpressionCheckTest; -import com.puppycrawl.tools.checkstyle.checks.SimplifyBooleanReturnCheckTest; import com.puppycrawl.tools.checkstyle.checks.TodoCommentCheckTest; import com.puppycrawl.tools.checkstyle.checks.TranslationCheckTest; import com.puppycrawl.tools.checkstyle.checks.UncommentedMainCheckTest; @@ -32,6 +19,19 @@ import com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheckTest; import com.puppycrawl.tools.checkstyle.checks.blocks.LeftCurlyCheckTest; import com.puppycrawl.tools.checkstyle.checks.blocks.NeedBracesCheckTest; import com.puppycrawl.tools.checkstyle.checks.blocks.RightCurlyCheckTest; +import com.puppycrawl.tools.checkstyle.checks.coding.ArrayTrailingCommaCheckTest; +import com.puppycrawl.tools.checkstyle.checks.coding.AvoidInlineConditionalsCheckTest; +import com.puppycrawl.tools.checkstyle.checks.coding.DoubleCheckedLockingCheckTest; +import com.puppycrawl.tools.checkstyle.checks.coding.EmptyStatementCheckTest; +import com.puppycrawl.tools.checkstyle.checks.coding.EqualsHashCodeCheckTest; +import com.puppycrawl.tools.checkstyle.checks.coding.HiddenFieldCheckTest; +import com.puppycrawl.tools.checkstyle.checks.coding.IllegalInstantiationCheckTest; +import com.puppycrawl.tools.checkstyle.checks.coding.InnerAssignmentCheckTest; +import com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheckTest; +import com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheckTest; +import com.puppycrawl.tools.checkstyle.checks.coding.RedundantThrowsCheckTest; +import com.puppycrawl.tools.checkstyle.checks.coding.SimplifyBooleanExpressionCheckTest; +import com.puppycrawl.tools.checkstyle.checks.coding.SimplifyBooleanReturnCheckTest; import com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheckTest; import com.puppycrawl.tools.checkstyle.checks.design.FinalClassCheckTest; import com.puppycrawl.tools.checkstyle.checks.design.HideUtilityClassConstructorCheckTest; diff --git a/src/tests/com/puppycrawl/tools/checkstyle/PackageNamesLoaderTest.java b/src/tests/com/puppycrawl/tools/checkstyle/PackageNamesLoaderTest.java index 0660e2b76..be1ffed31 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/PackageNamesLoaderTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/PackageNamesLoaderTest.java @@ -53,6 +53,7 @@ public class PackageNamesLoaderTest extends TestCase "com.puppycrawl.tools.checkstyle.", "com.puppycrawl.tools.checkstyle.checks.", "com.puppycrawl.tools.checkstyle.checks.blocks.", + "com.puppycrawl.tools.checkstyle.checks.coding.", "com.puppycrawl.tools.checkstyle.checks.design.", "com.puppycrawl.tools.checkstyle.checks.imports.", "com.puppycrawl.tools.checkstyle.checks.indentation.", diff --git a/src/tests/com/puppycrawl/tools/checkstyle/checks/ArrayTrailingCommaCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/ArrayTrailingCommaCheckTest.java similarity index 92% rename from src/tests/com/puppycrawl/tools/checkstyle/checks/ArrayTrailingCommaCheckTest.java rename to src/tests/com/puppycrawl/tools/checkstyle/checks/coding/ArrayTrailingCommaCheckTest.java index 13550195f..3b2c078bc 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/checks/ArrayTrailingCommaCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/ArrayTrailingCommaCheckTest.java @@ -1,4 +1,4 @@ -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; import com.puppycrawl.tools.checkstyle.DefaultConfiguration; diff --git a/src/tests/com/puppycrawl/tools/checkstyle/checks/AvoidInlineConditionalsCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/AvoidInlineConditionalsCheckTest.java similarity index 92% rename from src/tests/com/puppycrawl/tools/checkstyle/checks/AvoidInlineConditionalsCheckTest.java rename to src/tests/com/puppycrawl/tools/checkstyle/checks/coding/AvoidInlineConditionalsCheckTest.java index 30c94a84f..3efd2bf19 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/checks/AvoidInlineConditionalsCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/AvoidInlineConditionalsCheckTest.java @@ -1,4 +1,4 @@ -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; import com.puppycrawl.tools.checkstyle.DefaultConfiguration; diff --git a/src/tests/com/puppycrawl/tools/checkstyle/checks/DoubleCheckedLockingCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/DoubleCheckedLockingCheckTest.java similarity index 91% rename from src/tests/com/puppycrawl/tools/checkstyle/checks/DoubleCheckedLockingCheckTest.java rename to src/tests/com/puppycrawl/tools/checkstyle/checks/coding/DoubleCheckedLockingCheckTest.java index 560c240df..6feb07ac4 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/checks/DoubleCheckedLockingCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/DoubleCheckedLockingCheckTest.java @@ -1,4 +1,4 @@ -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; import com.puppycrawl.tools.checkstyle.DefaultConfiguration; diff --git a/src/tests/com/puppycrawl/tools/checkstyle/checks/EmptyStatementCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/EmptyStatementCheckTest.java similarity index 95% rename from src/tests/com/puppycrawl/tools/checkstyle/checks/EmptyStatementCheckTest.java rename to src/tests/com/puppycrawl/tools/checkstyle/checks/coding/EmptyStatementCheckTest.java index 96fa632ae..5b5493dce 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/checks/EmptyStatementCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/EmptyStatementCheckTest.java @@ -1,4 +1,4 @@ -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; import com.puppycrawl.tools.checkstyle.DefaultConfiguration; diff --git a/src/tests/com/puppycrawl/tools/checkstyle/checks/EqualsHashCodeCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/EqualsHashCodeCheckTest.java similarity index 92% rename from src/tests/com/puppycrawl/tools/checkstyle/checks/EqualsHashCodeCheckTest.java rename to src/tests/com/puppycrawl/tools/checkstyle/checks/coding/EqualsHashCodeCheckTest.java index f042534a4..4d7428fdb 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/checks/EqualsHashCodeCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/EqualsHashCodeCheckTest.java @@ -1,4 +1,4 @@ -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; import com.puppycrawl.tools.checkstyle.DefaultConfiguration; diff --git a/src/tests/com/puppycrawl/tools/checkstyle/checks/HiddenFieldCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheckTest.java similarity index 98% rename from src/tests/com/puppycrawl/tools/checkstyle/checks/HiddenFieldCheckTest.java rename to src/tests/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheckTest.java index b8d0057ef..79c3ec821 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/checks/HiddenFieldCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheckTest.java @@ -1,4 +1,4 @@ -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; import com.puppycrawl.tools.checkstyle.DefaultConfiguration; diff --git a/src/tests/com/puppycrawl/tools/checkstyle/checks/IllegalInstantiationCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheckTest.java similarity index 95% rename from src/tests/com/puppycrawl/tools/checkstyle/checks/IllegalInstantiationCheckTest.java rename to src/tests/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheckTest.java index 817abc2f5..f721e47b4 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/checks/IllegalInstantiationCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheckTest.java @@ -1,4 +1,4 @@ -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; import com.puppycrawl.tools.checkstyle.DefaultConfiguration; diff --git a/src/tests/com/puppycrawl/tools/checkstyle/checks/InnerAssignmentCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheckTest.java similarity index 92% rename from src/tests/com/puppycrawl/tools/checkstyle/checks/InnerAssignmentCheckTest.java rename to src/tests/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheckTest.java index 85cac8e8d..185d4300f 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/checks/InnerAssignmentCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheckTest.java @@ -1,4 +1,4 @@ -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; import com.puppycrawl.tools.checkstyle.DefaultConfiguration; diff --git a/src/tests/com/puppycrawl/tools/checkstyle/checks/MagicNumberCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheckTest.java similarity index 99% rename from src/tests/com/puppycrawl/tools/checkstyle/checks/MagicNumberCheckTest.java rename to src/tests/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheckTest.java index 57b1c064c..4edc8b1eb 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/checks/MagicNumberCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheckTest.java @@ -1,4 +1,4 @@ -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; import com.puppycrawl.tools.checkstyle.DefaultConfiguration; diff --git a/src/tests/com/puppycrawl/tools/checkstyle/checks/MissingSwitchDefaultCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/MissingSwitchDefaultCheckTest.java old mode 100755 new mode 100644 similarity index 92% rename from src/tests/com/puppycrawl/tools/checkstyle/checks/MissingSwitchDefaultCheckTest.java rename to src/tests/com/puppycrawl/tools/checkstyle/checks/coding/MissingSwitchDefaultCheckTest.java index 00a65a89d..c1f3c1a5d --- a/src/tests/com/puppycrawl/tools/checkstyle/checks/MissingSwitchDefaultCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/MissingSwitchDefaultCheckTest.java @@ -1,4 +1,4 @@ -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; import com.puppycrawl.tools.checkstyle.DefaultConfiguration; diff --git a/src/tests/com/puppycrawl/tools/checkstyle/checks/RedundantThrowsCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/RedundantThrowsCheckTest.java similarity index 97% rename from src/tests/com/puppycrawl/tools/checkstyle/checks/RedundantThrowsCheckTest.java rename to src/tests/com/puppycrawl/tools/checkstyle/checks/coding/RedundantThrowsCheckTest.java index cd6b5cad4..1faf6f2cc 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/checks/RedundantThrowsCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/RedundantThrowsCheckTest.java @@ -1,4 +1,4 @@ -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; import com.puppycrawl.tools.checkstyle.DefaultConfiguration; diff --git a/src/tests/com/puppycrawl/tools/checkstyle/checks/SimplifyBooleanExpressionCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanExpressionCheckTest.java similarity index 93% rename from src/tests/com/puppycrawl/tools/checkstyle/checks/SimplifyBooleanExpressionCheckTest.java rename to src/tests/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanExpressionCheckTest.java index efa5dd4e4..ded31c820 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/checks/SimplifyBooleanExpressionCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanExpressionCheckTest.java @@ -1,4 +1,4 @@ -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; import com.puppycrawl.tools.checkstyle.DefaultConfiguration; diff --git a/src/tests/com/puppycrawl/tools/checkstyle/checks/SimplifyBooleanReturnCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanReturnCheckTest.java similarity index 93% rename from src/tests/com/puppycrawl/tools/checkstyle/checks/SimplifyBooleanReturnCheckTest.java rename to src/tests/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanReturnCheckTest.java index 0b325a0eb..292ddbc8f 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/checks/SimplifyBooleanReturnCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanReturnCheckTest.java @@ -1,4 +1,4 @@ -package com.puppycrawl.tools.checkstyle.checks; +package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; import com.puppycrawl.tools.checkstyle.DefaultConfiguration;