Some Javadoc. * - * @see - * Documentation about GWT emulated source + * @see Documentation about GWT emulated source */ boolean emulated() { return false; @@ -89,9 +85,7 @@ boolean emulated() { * *
Some Javadoc. * - * @see - * Documentation about GWT emulated source + * @see Documentation about GWT emulated source */ boolean emulated() { return false; diff --git a/src/it/resources/com/google/checkstyle/test/chapter7javadoc/rule712paragraphs/InputFormattedCorrectJavadocParagraph.java b/src/it/resources/com/google/checkstyle/test/chapter7javadoc/rule712paragraphs/InputFormattedCorrectJavadocParagraph.java index 441b60e2f75..81bc89fdf4d 100644 --- a/src/it/resources/com/google/checkstyle/test/chapter7javadoc/rule712paragraphs/InputFormattedCorrectJavadocParagraph.java +++ b/src/it/resources/com/google/checkstyle/test/chapter7javadoc/rule712paragraphs/InputFormattedCorrectJavadocParagraph.java @@ -28,9 +28,7 @@ class InputFormattedCorrectJavadocParagraph { * } * * - * @see - * Documentation about GWT emulated source + * @see Documentation about GWT emulated source */ boolean emulated() { return false; @@ -59,9 +57,7 @@ class InnerInputCorrectJavaDocParagraphCheck { * *
Some Javadoc. * - * @see - * Documentation about GWT emulated source + * @see Documentation about GWT emulated source */ boolean emulated() { return false; @@ -89,9 +85,7 @@ boolean emulated() { * *
Some Javadoc. * - * @see - * Documentation about GWT emulated source + * @see Documentation about GWT emulated source */ boolean emulated() { return false; diff --git a/src/it/resources/com/google/checkstyle/test/chapter7javadoc/rule712paragraphs/InputFormattedIncorrectJavadocParagraph.java b/src/it/resources/com/google/checkstyle/test/chapter7javadoc/rule712paragraphs/InputFormattedIncorrectJavadocParagraph.java index 70b083dd970..20fa86f0a65 100644 --- a/src/it/resources/com/google/checkstyle/test/chapter7javadoc/rule712paragraphs/InputFormattedIncorrectJavadocParagraph.java +++ b/src/it/resources/com/google/checkstyle/test/chapter7javadoc/rule712paragraphs/InputFormattedIncorrectJavadocParagraph.java @@ -3,12 +3,14 @@ /** * Some Javadoc. * - *
/^ WARN/ Some Javadoc. + *
Some Javadoc. * *
*/ +// violation 2 lines above '
tag should be placed immediately before the first word' class InputFormattedIncorrectJavadocParagraph { + // violation 4 lines below '
tag should be placed immediately before the first word' /** * Some Javadoc. * @@ -27,14 +29,15 @@ class InputFormattedIncorrectJavadocParagraph { * *
Some Javadoc. * - * @see - * Documentation about GWT emulated source + * @see Documentation about GWT emulated source */ boolean emulated() { return false; } + // violation 6 lines below '
tag should be placed immediately before the first word' + // violation 7 lines below '
tag should be placed immediately before the first word' + // violation 8 lines below '
tag should be placed immediately before the first word' /** * Some Javadoc. * @@ -44,12 +47,14 @@ boolean emulated() { * *
* - *
/^WARN/ Some Javadoc. + *
Some Javadoc. * *
*/ + // violation 2 lines above '
tag should be placed immediately before the first word' class InnerInputCorrectJavaDocParagraphCheck { + // violation 4 lines below '
tag should be placed immediately before the first word' /** * Some Javadoc. * @@ -59,18 +64,18 @@ class InnerInputCorrectJavaDocParagraphCheck { */ public static final byte NUL = 0; + // violation 5 lines below '
tag should be placed immediately before the first word' + // violation 8 lines below '
tag should be placed immediately before the first word' /** - * /^WARN/ Some Javadoc. + * Some Javadoc. * - *
/^WARN/ + *
* - *
/^WARN/ Some Javadoc. + *
Some Javadoc. * *
* - * @see - * Documentation about GWT emulated source + * @see Documentation about GWT emulated source */ boolean emulated() { return false; @@ -89,16 +94,15 @@ boolean emulated() { */ public static final byte NUL = 0; + // violation 4 lines below '
tag should be placed immediately before the first word' /** - * /WARN/ Some Javadoc. + * Some Javadoc. * *
* *
Some Javadoc.
*
- * @see
- * Documentation about
+ * @see Documentation about
* GWT emulated source
tag should be preceded with an empty line.' @@ -107,7 +111,9 @@ boolean emulated() { } }; - /* 4 lines below, no violation until #15685 */ + // 2 violations 6 lines below: + // '
tag should be placed immediately before the first word' + // '
tag should not precede HTML block-tag '
tag should be placed immediately before the first word' + // '
tag should not precede HTML block-tag '
- *
tag should be preceded with an empty line.' + // 2 violations 4 lines above: + // '
tag should be placed immediately before the first word' + // '
tag should be preceded with an empty line.' public void foo() {} - /* 5 lines below, no violation until #15685 */ + // 2 violations 6 lines below: + // '
tag should be placed immediately before the first word' + // '
tag should not precede HTML block-tag '
* Rationale: Nejmeh says that his group had an informal NPATH limit of * 200 on individual routines; functions(methods) that exceeded this value were @@ -116,9 +121,11 @@ * Default value is {@code 200}. * *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/ClassMemberImpliedModifierCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/ClassMemberImpliedModifierCheck.java index e60830d36f9..32dff894414 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/ClassMemberImpliedModifierCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/ClassMemberImpliedModifierCheck.java @@ -27,9 +27,10 @@ import com.puppycrawl.tools.checkstyle.utils.ScopeUtil; /** - *+ *
* This check is effectively the opposite of * @@ -37,6 +38,7 @@ * It checks the modifiers on nested types in classes and records, ensuring that certain modifiers * are explicitly specified even though they are actually redundant. *
+ * ** Nested enums, interfaces, and records within a class are always {@code static} and as such the * compiler does not require the {@code static} modifier. This check provides the ability to enforce @@ -49,6 +51,7 @@ * } * } * + * *
* Rationale for this check: Nested enums, interfaces, and records are treated differently from * nested classes as they are only allowed to be {@code static}. Developers should not need to @@ -75,9 +78,11 @@ * Default value is {@code true}. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/InterfaceMemberImpliedModifierCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/InterfaceMemberImpliedModifierCheck.java index 035e217bf92..f92ca03c63a 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/InterfaceMemberImpliedModifierCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/InterfaceMemberImpliedModifierCheck.java @@ -26,9 +26,10 @@ import com.puppycrawl.tools.checkstyle.utils.ScopeUtil; /** - *+ *
* This check is effectively the opposite of * @@ -36,11 +37,13 @@ * It checks the modifiers on interface members, ensuring that certain modifiers are explicitly * specified even though they are actually redundant. *
+ * ** Methods in interfaces are {@code public} by default, however from Java 9 they can also be * {@code private}. This check provides the ability to enforce that {@code public} is explicitly * coded and not implicitly added by the compiler. *
+ * ** From Java 8, there are three types of methods in interfaces - static methods marked with * {@code static}, default methods marked with {@code default} and abstract methods which do not @@ -48,11 +51,13 @@ * {@code private}. This check provides the ability to enforce that {@code abstract} is * explicitly coded and not implicitly added by the compiler. *
+ * ** Fields in interfaces are always {@code public static final} and as such the compiler does not * require these modifiers. This check provides the ability to enforce that these modifiers are * explicitly coded and not implicitly added by the compiler. *
+ * ** Nested types within an interface are always {@code public static} and as such the compiler * does not require the {@code public static} modifiers. This check provides the ability to @@ -84,6 +89,7 @@ * } * } * + * *
* Rationale for this check: Methods, fields and nested types are treated differently * depending on whether they are part of an interface or part of a class. For example, by @@ -137,9 +143,11 @@ * Default value is {@code true}. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/ModifierOrderCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/ModifierOrderCheck.java index c8982c48926..6a74ae7393b 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/ModifierOrderCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/ModifierOrderCheck.java @@ -29,13 +29,14 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; /** - *+ *
* In additional, modifiers are checked to ensure all annotations * are declared before all other modifiers. *
+ * ** Rationale: Code is easier to read if everybody follows * a standard. *
+ * ** ATTENTION: We skip * * type annotations from validation. *
+ * ** Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/RedundantModifierCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/RedundantModifierCheck.java index 06ed358e158..03550248e8f 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/RedundantModifierCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/RedundantModifierCheck.java @@ -31,14 +31,16 @@ import com.puppycrawl.tools.checkstyle.utils.TokenUtil; /** - *+ *
* Rationale: The Java Language Specification strongly discourages the usage * of {@code public} and {@code abstract} for method declarations in interface * definitions as a matter of style. *
+ * *The check validates:
** interfaces by definition are abstract so the {@code abstract} modifier is redundant on them. *
+ * *Type declarations nested under interfaces by definition are public and static, * so the {@code public} and {@code static} modifiers on nested type declarations are redundant. * On the other hand, classes inside of interfaces can be abstract or non abstract. * So, {@code abstract} modifier is allowed. *
+ * *Fields in interfaces and annotations are automatically * public, static and final, so these modifiers are redundant as * well.
@@ -112,12 +117,15 @@ * *Since these methods can be overridden in these situations, the final methods are not * marked as redundant even though they can't be extended by other classes/enums.
+ * ** Nested {@code enum} types are always static by default. *
+ * *Final classes by definition cannot be extended so the {@code final} * modifier on the method of a final class is redundant. *
+ * *Public modifier for constructors in non-public non-protected classes * is always obsolete:
* @@ -193,9 +201,11 @@ * LAMBDA. * * + * ** Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheck.java index 6f1f5779110..92c2806389b 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheck.java @@ -34,13 +34,15 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
'_' is considered as word separator in identifier name.
+ * ** {@code allowedAbbreviationLength} specifies how many consecutive capital letters are * allowed in the identifier. @@ -51,6 +53,7 @@ * is what should be used to enforce strict camel casing. The identifier 'MyTest' would * be allowed, but 'MyTEst' would not be. *
+ * ** {@code ignoreFinal}, {@code ignoreStatic}, and {@code ignoreStaticFinal} * control whether variables with the respective modifiers are to be ignored. @@ -123,9 +126,11 @@ * RECORD_COMPONENT_DEF. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
@@ -468,11 +473,13 @@ private String getAbbreviationIfIllegal(String str, int beginIndex, int endIndex /** * Gets the abbreviation, where {@code beginIndex} and {@code endIndex} are * inclusive indexes of a sequence of consecutive upper-case characters. + * ** The character at {@code endIndex} is only included in the abbreviation if * it is the last character in the string; otherwise it is usually the first * capital in the next word. *
+ * ** For example, {@code getAbbreviation("getXMLParser", 3, 6)} returns "XML" * (not "XMLP"), and so does {@code getAbbreviation("parseXML", 5, 7)}. diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheck.java index c08e3fe0c2d..a8a1f885a44 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheck.java @@ -27,10 +27,11 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; /** - *
+ *
* Rationale: Abstract classes are convenience base class implementations of * interfaces. For this reason, it should be made obvious that a given class @@ -54,9 +55,11 @@ * Default value is {@code false}. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/CatchParameterNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/CatchParameterNameCheck.java index 4db0862abe7..800ed122a68 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/CatchParameterNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/CatchParameterNameCheck.java @@ -23,9 +23,10 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; /** - *+ *
* Default pattern has the following characteristic: *
@@ -48,9 +49,11 @@ * Default value is {@code "^(e|t|ex|[a-z][a-z][a-zA-Z]+|_)$"}. * * + * ** Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ClassTypeParameterNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ClassTypeParameterNameCheck.java index adbe6559acd..0a034a746be 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ClassTypeParameterNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ClassTypeParameterNameCheck.java @@ -23,9 +23,9 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; /** - *+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ConstantNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ConstantNameCheck.java index 0fb85ff879f..6d814309e78 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ConstantNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ConstantNameCheck.java @@ -24,13 +24,14 @@ import com.puppycrawl.tools.checkstyle.utils.ScopeUtil; /** - *+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/IllegalIdentifierNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/IllegalIdentifierNameCheck.java index a1f8868556f..6668a11cb98 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/IllegalIdentifierNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/IllegalIdentifierNameCheck.java @@ -25,7 +25,7 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/InterfaceTypeParameterNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/InterfaceTypeParameterNameCheck.java index 2c4c80a54ef..8625cc33ecd 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/InterfaceTypeParameterNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/InterfaceTypeParameterNameCheck.java @@ -23,9 +23,10 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; /** - *+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LambdaParameterNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LambdaParameterNameCheck.java index cba01409d40..8ebc6384237 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LambdaParameterNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LambdaParameterNameCheck.java @@ -26,9 +26,9 @@ import com.puppycrawl.tools.checkstyle.utils.TokenUtil; /** - *+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalFinalVariableNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalFinalVariableNameCheck.java index c2ae756a041..651c5deb64e 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalFinalVariableNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalFinalVariableNameCheck.java @@ -25,11 +25,12 @@ import com.puppycrawl.tools.checkstyle.utils.ScopeUtil; /** - *+ *
* This check does not support final pattern variables. Instead, use * @@ -54,9 +55,11 @@ * RESOURCE. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalVariableNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalVariableNameCheck.java index 4517599924d..a3e45796589 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalVariableNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalVariableNameCheck.java @@ -24,11 +24,12 @@ import com.puppycrawl.tools.checkstyle.utils.ScopeUtil; /** - *+ *
* This check does not support pattern variables. Instead, use
*
@@ -49,9 +50,11 @@
* Default value is {@code "^([a-z][a-zA-Z0-9]*|_)$"}.
*
*
+ *
*
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker}
*
* Violation Message Keys:
*
+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker}
*
* Violation Message Keys:
*
+ * Also, checks if a method name has the same name as the residing class.
* The default is false (it is not allowed). It is legal in Java to have
@@ -70,9 +70,11 @@
* Default value is {@code "^[a-z][a-zA-Z0-9]*$"}.
*
*
+ *
*
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker}
*
* Violation Message Keys:
*
+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker}
*
* Violation Message Keys:
*
+ *
* The default value of {@code format} for module {@code PackageName} has been chosen to match
* the requirements in the
@@ -47,9 +48,11 @@
* Default value is {@code "^[a-z]+(\.[a-zA-Z_]\w*)*$"}.
*
*
+ *
*
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker}
*
* Violation Message Keys:
*
+ *
* To validate {@code catch} parameters please use
*
* CatchParameterName.
*
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker}
*
* Violation Message Keys:
*
+ *
* This check combines all the functionality provided by
* RegexpHeader
* except supplying the regular expression from a file.
*
* It differs from them in that it works in multiline mode. Its regular expression
* can span multiple lines and it checks this against the whole file at once.
* The others work in single-line mode. Their single or multiple regular expressions
* can only span one line. They check each of these against each line in the file in turn.
*
* Note: Because of the different mode of operation there may be some
* changes in the regular expressions used to achieve a particular end.
*
* In multiline mode...
*
* Note: Not all regular expression engines are created equal.
* Some provide extra functions that others do not and some elements
@@ -78,6 +83,7 @@
* java.util.regex package
*
+ *
*
*
+ *
*
* Note: When entering a regular expression as a parameter in * the XML config file you must also take into account the XML rules. e.g. @@ -121,9 +127,11 @@ * Default value is {@code null}. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpMultilineCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpMultilineCheck.java index e570bce5389..9ce663bf927 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpMultilineCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpMultilineCheck.java @@ -29,9 +29,10 @@ import com.puppycrawl.tools.checkstyle.api.FileText; /** - *+ *
* Rationale: This check can be used to when the regular expression can be span multiple lines. *
@@ -74,9 +75,11 @@ * Default value is {@code 0}. * * + * ** Parent is {@code com.puppycrawl.tools.checkstyle.Checker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpOnFilenameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpOnFilenameCheck.java index b0e3b07b7a7..6a4b91c1da4 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpOnFilenameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpOnFilenameCheck.java @@ -30,12 +30,12 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* When customizing the check, the properties are applied in a specific order. @@ -94,9 +94,11 @@ * Type is {@code boolean}. * Default value is {@code true}. * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.Checker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineCheck.java index 061199e3aa5..c4b4e930c28 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineCheck.java @@ -28,9 +28,10 @@ import com.puppycrawl.tools.checkstyle.api.FileText; /** - *+ *
* Rationale: This check can be used to prototype checks and to find common bad * practice such as calling {@code ex.printStacktrace()}, @@ -69,9 +70,11 @@ * Default value is {@code 0}. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.Checker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineJavaCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineJavaCheck.java index ca5f6bafafb..371caa88c04 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineJavaCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineJavaCheck.java @@ -27,9 +27,10 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/FileLengthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/FileLengthCheck.java index de4808e792a..9532466c652 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/FileLengthCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/FileLengthCheck.java @@ -26,9 +26,10 @@ import com.puppycrawl.tools.checkstyle.api.FileText; /** - *+ *
* Rationale: If a source file becomes very long it is hard to understand. * Therefore, long classes should usually be refactored into several @@ -46,9 +47,11 @@ * Default value is {@code 2000}. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.Checker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/LambdaBodyLengthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/LambdaBodyLengthCheck.java index 3401761c234..28877e5b9d3 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/LambdaBodyLengthCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/LambdaBodyLengthCheck.java @@ -25,9 +25,10 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; /** - *+ *
* Rationale: Similar to anonymous inner classes, if lambda body becomes very long * it is hard to understand and to see the flow of the method @@ -41,9 +42,11 @@ * Default value is {@code 10}. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheck.java index bfbc7b1e1c6..4743bc516d5 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheck.java @@ -28,9 +28,10 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* Rationale: Long lines are hard to read in printouts or if developers * have limited screen space for the source code, e.g. if the IDE displays @@ -75,9 +76,11 @@ * Default value is {@code 80}. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.Checker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheck.java index d3b941c1c32..1da615a1f12 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheck.java @@ -32,10 +32,11 @@ import com.puppycrawl.tools.checkstyle.utils.ScopeUtil; /** - *+ *
* This check can be configured to flag classes that define too many methods * to prevent the class from getting too complex. Counting can be customized @@ -47,6 +48,7 @@ * {@code maxPackage} methods. A violation won't appear for 8 public methods, * but one will appear if there is also 3 private methods or any package-private methods. *
+ * ** Methods defined in anonymous classes are not counted towards any totals. * Counts only go towards the main type declaration parent, and are kept separate @@ -117,9 +119,11 @@ * RECORD_DEF. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheck.java index 752affef61d..1732ff3cd82 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheck.java @@ -32,9 +32,10 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* Rationale: If a method becomes very long it is hard to understand. * Therefore, long methods should usually be refactored into several @@ -64,9 +65,11 @@ * COMPACT_CTOR_DEF. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/OuterTypeNumberCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/OuterTypeNumberCheck.java index 4c24722dd6a..ea4351ca0d5 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/OuterTypeNumberCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/OuterTypeNumberCheck.java @@ -25,9 +25,10 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; /** - *+ *
* Rationale: It is considered good practice to only define one outer type per file. *
@@ -38,9 +39,11 @@ * Default value is {@code 1}. * * + * ** Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ParameterNumberCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ParameterNumberCheck.java index e4a3fe16dc9..75087642c40 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ParameterNumberCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ParameterNumberCheck.java @@ -30,9 +30,9 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/RecordComponentNumberCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/RecordComponentNumberCheck.java index 9c53a033e64..a0e49e1d2c2 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/RecordComponentNumberCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/RecordComponentNumberCheck.java @@ -31,11 +31,12 @@ import com.puppycrawl.tools.checkstyle.utils.TokenUtil; /** - *+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/AbstractParenPadCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/AbstractParenPadCheck.java index c8bb5471abc..cbfbc9e4492 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/AbstractParenPadCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/AbstractParenPadCheck.java @@ -28,10 +28,10 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *Abstract class for checking the padding of parentheses. That is whether a + *
+ *
* for ( * ; i < j; i++, j--) @@ -45,9 +45,11 @@ * Default value is {@code nospace}. * * + * ** Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForIteratorPadCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForIteratorPadCheck.java index 680d4296c39..eced10b19c6 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForIteratorPadCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForIteratorPadCheck.java @@ -28,11 +28,11 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* Checks the padding of an empty for iterator; that is whether a white * space is required at an empty for iterator, or such white space is * forbidden. No check occurs if there is a line wrap at the iterator, as in - * + *** for (Iterator foo = very.long.line.iterator(); * foo.hasNext(); @@ -45,9 +45,11 @@ * Default value is {@code nospace}. * * + * ** Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyLineSeparatorCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyLineSeparatorCheck.java index d1b5e6233b0..091ed1c0af8 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyLineSeparatorCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyLineSeparatorCheck.java @@ -35,15 +35,17 @@ import com.puppycrawl.tools.checkstyle.utils.TokenUtil; /** - *+ *
* Checks for empty line separators before package, all import declarations, * fields, constructors, methods, nested classes, * static initializers and instance initializers. - * + *+ * ** Checks for empty line separators before not only statements but * implementation and documentation comments and blocks as well. *
+ * ** ATTENTION: empty line separator is required between token siblings, * not after line where token is found. @@ -101,9 +103,11 @@ * COMPACT_CTOR_DEF. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/FileTabCharacterCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/FileTabCharacterCheck.java index 2755db438a1..fddd37c1af9 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/FileTabCharacterCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/FileTabCharacterCheck.java @@ -26,9 +26,10 @@ import com.puppycrawl.tools.checkstyle.api.FileText; /** - *+ *
* Checks that there are no tab characters ({@code '\t'}) in the source code. - * + *+ * ** Rationale: *
@@ -56,9 +57,11 @@ * Default value is {@code ""}. * * + * ** Parent is {@code com.puppycrawl.tools.checkstyle.Checker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/GenericWhitespaceCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/GenericWhitespaceCheck.java index 7106012dc9b..545d3d04a96 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/GenericWhitespaceCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/GenericWhitespaceCheck.java @@ -29,11 +29,12 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* Checks that the whitespace around the Generic tokens (angle brackets) * "<" and ">" are correct to the typical convention. * The convention is not configurable. - * + *+ * ** Left angle bracket ("<"): *
@@ -45,6 +46,7 @@ *
* Right angle bracket (">"): *
@@ -53,9 +55,11 @@ ** Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/MethodParamPadCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/MethodParamPadCheck.java index 7c276b14654..d3d80961b44 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/MethodParamPadCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/MethodParamPadCheck.java @@ -29,7 +29,7 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoLineWrapCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoLineWrapCheck.java index 0a2d7e6fb7d..fcf65939259 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoLineWrapCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoLineWrapCheck.java @@ -27,10 +27,10 @@ import com.puppycrawl.tools.checkstyle.utils.TokenUtil; /** - *Checks that chosen statements are not line-wrapped. + *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceAfterCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceAfterCheck.java index c3f589db617..6f42e03a2dd 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceAfterCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceAfterCheck.java @@ -28,13 +28,14 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* The check processes * @@ -49,10 +50,12 @@ * * INDEX_OP will be ignored. *
+ * ** If the annotation is between the type and the array, like {@code char @NotNull [] param}, * the check will skip validation for spaces. *
+ * ** Note: This check processes the * @@ -96,9 +99,11 @@ * INDEX_OP. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCaseDefaultColonCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCaseDefaultColonCheck.java index 90916df78d6..14a34740664 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCaseDefaultColonCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCaseDefaultColonCheck.java @@ -26,12 +26,14 @@ import com.puppycrawl.tools.checkstyle.utils.TokenUtil; /** - *+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCheck.java index 6477ffd842c..259a759e519 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCheck.java @@ -27,14 +27,14 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/OperatorWrapCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/OperatorWrapCheck.java index 1811b10706b..2d6c5495d47 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/OperatorWrapCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/OperatorWrapCheck.java @@ -30,11 +30,12 @@ import com.puppycrawl.tools.checkstyle.utils.TokenUtil; /** - *+ *
* See the * Java Language Specification for more information about {@code instanceof} operator. @@ -98,9 +99,11 @@ * LITERAL_INSTANCEOF. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadCheck.java index d4c5b4b9f6f..8fc5d3b8377 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadCheck.java @@ -27,7 +27,7 @@ import com.puppycrawl.tools.checkstyle.utils.TokenUtil; /** - *+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SeparatorWrapCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SeparatorWrapCheck.java index 5cf934f91f7..3bc45878a8a 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SeparatorWrapCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SeparatorWrapCheck.java @@ -30,9 +30,9 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SingleSpaceSeparatorCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SingleSpaceSeparatorCheck.java index 82dcc43b15b..1090a161b9b 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SingleSpaceSeparatorCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SingleSpaceSeparatorCheck.java @@ -28,13 +28,13 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* Setting {@code validateComments} to false will ignore cases like: @@ -64,9 +64,11 @@ * Default value is {@code false}. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypecastParenPadCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypecastParenPadCheck.java index 2ba4f8b0c46..ea0e87188f1 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypecastParenPadCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypecastParenPadCheck.java @@ -23,11 +23,11 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; /** - *+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAfterCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAfterCheck.java index b04e8ccb8be..03e4bd9bd35 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAfterCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAfterCheck.java @@ -26,13 +26,13 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundCheck.java index 1f9c2041c29..29f3a4ee188 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundCheck.java @@ -26,10 +26,10 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* public MyClass() {} // empty constructor * public void func() {} // empty method @@ -43,11 +43,14 @@ * Runnable noop = () -> {}; // empty lambda * public @interface Beta {} // empty annotation type *+ * *
* may optionally be exempted from the policy using the {@code allowEmptyMethods}, * {@code allowEmptyConstructors}, {@code allowEmptyTypes}, {@code allowEmptyLoops}, - * {@code allowEmptyLambdas} and {@code allowEmptyCatches} properties. + * {@code allowEmptyLambdas}, {@code allowEmptyCatches} + * and {@code allowEmptySwitchBlockStatements} properties. *
+ * ** This check does not flag as violation double brace initialization like: *
@@ -56,6 +59,7 @@ * setProperty("key", "value"); * }}; * + * ** Parameter allowEmptyCatches allows to suppress violations when token list * contains SLIST to check if beginning of block is surrounded by whitespace @@ -66,11 +70,13 @@ * k = 5 / i; * } catch (ArithmeticException ex) {} * + * *
* With this property turned off, this raises violation because the beginning * of the catch block (left curly bracket) is not separated from the end * of the catch block (right curly bracket). *
+ * ** Note: * Switch expressions are ignored by this check. @@ -102,6 +108,12 @@ * Default value is {@code false}. * *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
+ * ** Violation Message Keys: *
@@ -268,6 +282,8 @@ public class WhitespaceAroundCheck extends AbstractCheck { private boolean allowEmptyLambdas; /** Allow empty catch bodies. */ private boolean allowEmptyCatches; + /** Allow empty switch blocks and block statements. */ + private boolean allowEmptySwitchBlockStatements; /** * Ignore whitespace around colon in * @@ -473,6 +489,16 @@ public void setAllowEmptyCatches(boolean allow) { allowEmptyCatches = allow; } + /** + * Setter to allow empty switch blocks and block statements. + * + * @param allow {@code true} to allow empty switch case and default blocks. + * @since 10.19.0 + */ + public void setAllowEmptySwitchBlockStatements(boolean allow) { + allowEmptySwitchBlockStatements = allow; + } + @Override public void visitToken(DetailAST ast) { final int currentType = ast.getType(); @@ -599,7 +625,8 @@ private boolean isEmptyBlock(DetailAST ast, int parentType) { || isEmptyCtorBlockCheckedFromRcurly(ast) || isEmptyLoop(ast, parentType) || isEmptyLambda(ast, parentType) - || isEmptyCatch(ast, parentType); + || isEmptyCatch(ast, parentType) + || isEmptySwitchBlockStatement(ast); } /** @@ -720,6 +747,41 @@ private boolean isEmptyCatch(DetailAST ast, int parentType) { return allowEmptyCatches && isEmptyBlock(ast, parentType, TokenTypes.LITERAL_CATCH); } + /** + * Tests if the given {@code DetailAst} is part of an allowed empty + * switch case or default block. + * + * @param ast the {@code DetailAst} to test. + * @return {@code true} if {@code ast} makes up part of an allowed + * empty switch case or default block. + */ + private boolean isEmptySwitchBlockStatement(DetailAST ast) { + final boolean isEmptySwitchBlockStatement; + + if (allowEmptySwitchBlockStatements) { + final DetailAST parent = ast.getParent(); + final DetailAST grandParent = parent.getParent(); + + final boolean isEmptyCaseInSwitchRule = + isEmptyBlock(ast, parent.getType(), TokenTypes.SWITCH_RULE); + + final boolean isEmptyCaseGroupCheckedFromLcurly = + isEmptyBlock(ast, grandParent.getType(), TokenTypes.CASE_GROUP); + + final boolean isEmptyCaseGroupCheckedFromRcurly = + parent.getFirstChild().getType() == TokenTypes.RCURLY + && grandParent.getParent().getType() == TokenTypes.CASE_GROUP; + + isEmptySwitchBlockStatement = isEmptyCaseInSwitchRule + || isEmptyCaseGroupCheckedFromLcurly || isEmptyCaseGroupCheckedFromRcurly; + } + else { + isEmptySwitchBlockStatement = false; + } + + return isEmptySwitchBlockStatement; + } + /** * Test if the given {@code DetailAST} is part of an empty block. * An example empty block might look like the following diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filefilters/BeforeExecutionExclusionFileFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filefilters/BeforeExecutionExclusionFileFilter.java index 8bf73d20be9..8d8badaeb04 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filefilters/BeforeExecutionExclusionFileFilter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filefilters/BeforeExecutionExclusionFileFilter.java @@ -25,10 +25,10 @@ import com.puppycrawl.tools.checkstyle.api.BeforeExecutionFileFilter; /** - *+ *
* By default, Checkstyle includes all files and subdirectories in a directory to be processed and @@ -51,6 +51,7 @@ * Type is {@code java.util.regex.Pattern}. * Default value is {@code null}. * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.Checker} *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/CsvFilterElement.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/CsvFilterElement.java index 1a3f8b64b1b..0b62f27e7f9 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/CsvFilterElement.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/CsvFilterElement.java @@ -26,10 +26,10 @@ import java.util.StringTokenizer; /** - *+ *
+ *
* SeverityMatchFilter can suppress Checks that have Treewalker or Checker as parent module. *
@@ -48,6 +49,7 @@ * Default value is {@code error}. * * + * ** Parent is {@code com.puppycrawl.tools.checkstyle.Checker} *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWarningsFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWarningsFilter.java index 275ea2d1c6a..bd686f0ca87 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWarningsFilter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWarningsFilter.java @@ -25,16 +25,18 @@ import com.puppycrawl.tools.checkstyle.checks.SuppressWarningsHolder; /** - *+ *
* Rationale: Same as for {@code SuppressionCommentFilter}. In the contrary to it here, * comments are not used comments but the builtin syntax of {@code @SuppressWarnings}. * This can be perceived as a more elegant solution than using comments. * Also, this approach maybe supported by various IDE. *
+ * ** Usage: This filter only works in conjunction with a * @@ -45,10 +47,12 @@ * Name of check in annotation is case-insensitive and should be written with * any dotted prefix or "Check" suffix removed. *
+ * ** SuppressWarningsFilter can suppress Checks that have Treewalker or * Checker as parent module. *
+ * ** Parent is {@code com.puppycrawl.tools.checkstyle.Checker} *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java index aed9d871a48..19fe5b99553 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java @@ -38,15 +38,17 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* Rationale: Same as {@code SuppressionCommentFilter}. * Whereas the SuppressionCommentFilter uses matched pairs of filters to turn * on/off comment matching, {@code SuppressWithNearbyCommentFilter} uses single comments. * This requires fewer lines to mark a region, and may be aesthetically preferable in some contexts. *
+ * ** Attention: This filter may only be specified within the TreeWalker module * ({@code <module name="TreeWalker"/>}) and only applies to checks which are also @@ -55,6 +57,7 @@ * * SuppressWithPlainTextCommentFilter or similar filter must be used. *
+ * ** SuppressWithNearbyCommentFilter can suppress Checks that have * Treewalker as parent module. @@ -97,6 +100,7 @@ * Default value is {@code null}. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyTextFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyTextFilter.java index 41a79726668..53972a082de 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyTextFilter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyTextFilter.java @@ -39,10 +39,11 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* Setting {@code .*} value to {@code nearbyTextPattern} property will see any * text as a suppression and will likely suppress all audit events in the file. It is @@ -82,6 +83,7 @@ * Default value is {@code "SUPPRESS CHECKSTYLE (\w+)"}. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.Checker} *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java index 0d9ccd465bb..c4509e6e25b 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java @@ -40,7 +40,7 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* Please, be aware of the fact that, it is not recommended to use the filter * for Java code anymore, however you still are able to use it to suppress audit * events received from the checks which implement FileSetCheck interface. *
+ * ** Rationale: Sometimes there are legitimate reasons for violating a check. * When this is a matter of the code in question and not personal preference, @@ -62,15 +64,18 @@ * a separate suppressions file, which must be kept up-to-date as the source * file is edited. *
+ * ** Note that the suppression comment should be put before the violation. * You can use more than one suppression comment each on separate line. *
+ * ** Properties {@code offCommentFormat} and {@code onCommentFormat} must have equal * * paren counts. *
+ * ** SuppressionWithPlainTextCommentFilter can suppress Checks that have Treewalker or * Checker as parent module. @@ -104,6 +109,7 @@ * Default value is {@code "// CHECKSTYLE:ON"}. * * + * *
* Parent is {@code com.puppycrawl.tools.checkstyle.Checker} *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java index 13c3e77c335..d6c1211fc61 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java @@ -39,9 +39,10 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** - *+ *
* Rationale: * Sometimes there are legitimate reasons for violating a check. When @@ -51,10 +52,12 @@ * This is sometimes superior to a separate suppressions file, which * must be kept up-to-date as the source file is edited. *
+ * ** Note that the suppression comment should be put before the violation. * You can use more than one suppression comment each on separate line. *
+ * ** Attention: This filter may only be specified within the TreeWalker module * ({@code <module name="TreeWalker"/>}) and only applies to checks which are also @@ -62,11 +65,13 @@ * * SuppressWithPlainTextCommentFilter or similar filter must be used. *
+ * ** {@code offCommentFormat} and {@code onCommentFormat} must have equal * * paren counts. *
+ * ** SuppressionCommentFilter can suppress Checks that have Treewalker as parent module. *
@@ -108,6 +113,7 @@ * Default value is {@code "CHECKSTYLE:ON"}. * * + * ** Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionFilter.java index f76bbaab0e1..358798a1866 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionFilter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionFilter.java @@ -31,12 +31,13 @@ import com.puppycrawl.tools.checkstyle.utils.UnmodifiableCollectionUtil; /** - *+ *
* A suppressions XML document * contains a set of {@code suppress} elements, where each {@code suppress} @@ -77,18 +78,22 @@ * It is optional. * * + * *
* Each audit event is checked against each {@code suppress} element. * It is suppressed if all specified attributes match against the audit event. *
+ * ** ATTENTION: filtering by message is dependent on runtime locale. * If project is running in different languages it is better to avoid filtering by message. *
+ * ** You can download template of empty suppression filter * here. *
+ * ** Location of the file defined in {@code file} property is checked in the following order: *
@@ -104,6 +109,7 @@ * if no file found, then passed to the {@code ClassLoader.getResource()} method. * * + * ** SuppressionFilter can suppress Checks that have Treewalker or Checker as parent module. *
@@ -122,6 +128,7 @@ * Default value is {@code false}. * * + * ** Parent is {@code com.puppycrawl.tools.checkstyle.Checker} *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionSingleFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionSingleFilter.java index 29d197bee29..ffb215522a9 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionSingleFilter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionSingleFilter.java @@ -26,26 +26,30 @@ import com.puppycrawl.tools.checkstyle.api.Filter; /** - *+ *
- * Rationale: To allow users use suppressions configured in the same config with other modules. - * SuppressionFilter and SuppressionXpathFilter are require separate file. + * Rationale: To allow users to use suppressions configured in the same config as other modules. + * {@code SuppressionFilter} and {@code SuppressionXpathFilter} require a separate file. *
+ * ** Advice: If checkstyle configuration is used for several projects, single suppressions on common * files/folders is better to put in checkstyle configuration as common rule. All suppression that * are for specific file names is better to keep in project specific config file. *
+ * ** Attention: This filter only supports single suppression, and will need multiple instances if * users wants to suppress multiple violations. *
+ * *- * SuppressionSingleFilter can suppress Checks that have Treewalker or - * Checker as parent module. + * {@code SuppressionSingleFilter} can suppress Checks that have {@code Treewalker} or + * {@code Checker} as parent module. *
** Parent is {@code com.puppycrawl.tools.checkstyle.Checker} *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathFilter.java index 6ea0a56d4dd..6aa300ec92f 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathFilter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathFilter.java @@ -32,14 +32,15 @@ import com.puppycrawl.tools.checkstyle.utils.FilterUtil; /** - *+ *
* Currently, filter does not support the following checks: *
@@ -56,6 +57,7 @@ * #7759) * * + * ** Also, the filter does not support suppressions inside javadoc reported by Javadoc checks: *
@@ -106,10 +108,12 @@ * WriteTag * * + * ** Note, that support for these Checks will be available after resolving issue * #5770. *
+ * ** Currently, filter supports the following xpath axes: *
@@ -151,11 +155,13 @@ * self * * + * ** You can use the command line helper tool to generate xpath suppressions based on your * configuration file and input files. See here * for more details. *
+ * ** The suppression file location is checked in following order: *
@@ -171,6 +177,7 @@ * if no file found, then passed to the {@code ClassLoader.getResource()} method. * * + * ** SuppressionXpathFilter can suppress Checks that have Treewalker as parent module. *
@@ -188,6 +195,7 @@ * Default value is {@code false}. * * + * ** Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathSingleFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathSingleFilter.java index 336d1a30b66..70db814cc39 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathSingleFilter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathSingleFilter.java @@ -26,26 +26,30 @@ import com.puppycrawl.tools.checkstyle.TreeWalkerFilter; /** - *+ *
- * Rationale: To allow users use suppressions configured in the same config with - * other modules. SuppressionFilter and SuppressionXpathFilter are require separate file. + * Rationale: To allow users to use suppressions configured in the same config as other modules. + * {@code SuppressionFilter} and {@code SuppressionXpathFilter} require a separate file. *
+ * ** Advice: If checkstyle configuration is used for several projects, single suppressions * on common files/folders is better to put in checkstyle configuration as common rule. * All suppression that are for specific file names is better to keep in project * specific config file. *
+ * ** Attention: This filter only supports single suppression, and will need multiple * instances if users wants to suppress multiple violations. *
+ * *- * SuppressionXpathSingleFilter can suppress Checks that have Treewalker as parent module. + * {@code SuppressionXpathSingleFilter} can suppress Checks that have {@code Treewalker} as parent module. *
** Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/grammar/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/grammar/package-info.java index 33fd3670900..46b71dcf179 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/grammar/package-info.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/grammar/package-info.java @@ -19,6 +19,7 @@ /** * Contains the grammar used by the Checkstyle framework. + * ** You should not be referring to this package. *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTableModel.java b/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTableModel.java index 2540c0d7642..ba6898ba122 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTableModel.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTableModel.java @@ -27,6 +27,7 @@ import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.gui.MainFrameModel.ParseMode; +import com.puppycrawl.tools.checkstyle.utils.CommonUtil; /** * The model that backs the parse tree in the GUI. @@ -62,7 +63,7 @@ protected final void setParseTree(DetailAST parseTree) { final Object[] path = {pModel.getRoot()}; // no need to setup remaining info, as the call results in a // table structure changed event anyway - we just pass nulls - fireTreeStructureChanged(this, path, null, (Object[]) null); + fireTreeStructureChanged(this, path, null, CommonUtil.EMPTY_OBJECT_ARRAY); } /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/package-info.java index 743924f116e..c94befb4b92 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/package-info.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/package-info.java @@ -21,6 +21,7 @@ * Contains the implementation of the Checkstyle framework. Developers of * plug-ins for Checkstyle should refer to this package to configure and run * it. + * ** You should not be referring to this package if you are * implementing your own check. diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/utils/JavadocUtil.java b/src/main/java/com/puppycrawl/tools/checkstyle/utils/JavadocUtil.java index 360a0d605a6..e5fe04b084b 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/utils/JavadocUtil.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/utils/JavadocUtil.java @@ -338,11 +338,13 @@ public static String escapeAllControlChars(String text) { /** * Checks Javadoc comment it's in right place. + * *
From Javadoc util documentation: * "Placement of comments - Documentation comments are recognized only when placed * immediately before class, interface, constructor, method, field or annotation field * declarations -- see the class example, method example, and field example. * Documentation comments placed in the body of a method are ignored."
+ * *If there are many documentation comments per declaration statement, * only the last one will be recognized.
* diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/utils/ScopeUtil.java b/src/main/java/com/puppycrawl/tools/checkstyle/utils/ScopeUtil.java index f2b0cab89ee..5c49f0f4725 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/utils/ScopeUtil.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/utils/ScopeUtil.java @@ -90,6 +90,7 @@ public static Scope getScopeFromMods(DetailAST aMods) { /** * Returns the default {@code Scope} for a {@code DetailAST}. + * *The following rules are taken into account:
*Note: it simply wraps the existing JDK methods to provide a workaround + *
tag should be preceded with an empty line. javadoc.paragraph.misplaced.tag=
tag should be placed immediately before the first word, with no space after. +javadoc.paragraph.preceded.block.tag=
tag should not precede HTML block-tag ''<{0}>'',
tag should be removed. javadoc.paragraph.redundant.paragraph=Redundant
tag. javadoc.paragraph.tag.after=Empty line should be followed by
tag on the next line. javadoc.parse.rule.error=Javadoc comment at column {0} has parse error. Details: {1} while parsing {2} diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_de.properties index 22fe47d1415..2e3e5080e85 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_de.properties +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_de.properties @@ -20,6 +20,7 @@ javadoc.noPeriod=Der erste Satz sollte mit einem Punkt enden. javadoc.packageInfo=Es fehlt eine package-info.java. javadoc.paragraph.line.before=Einem
-Tag im Javadoc sollte eine leere Zeile vorangestellt werden. javadoc.paragraph.misplaced.tag=
-Tag sollte unmittelbar vor dem ersten Wort platziert werden, ohne Leerzeichen dazwischen. +javadoc.paragraph.preceded.block.tag=Das
-Tag sollte nicht vor dem HTML-Block-Tag „<{0}>“ stehen. Das
-Tag sollte entfernt werden. javadoc.paragraph.redundant.paragraph=Redundantes
-Tag. javadoc.paragraph.tag.after=Auf eine leere Zeile im Javadoc sollte ein
-Tag in der nächsten Zeile folgen. javadoc.parse.rule.error=Der Javadoc-Kommentar an Position {0} führt zu einem Parserfehler. Details: {1} beim Parsen von {2} diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_es.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_es.properties index 1f362f73657..bb757c52044 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_es.properties +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_es.properties @@ -20,6 +20,7 @@ javadoc.noPeriod=La primera frase debería finalizar con un punto. javadoc.packageInfo=Falta el archivo package-info.java. javadoc.paragraph.line.before=
etiqueta debe ir precedida de una línea vacía. javadoc.paragraph.misplaced.tag=
etiqueta debe colocarse inmediatamente antes de la primera palabra, sin espacio después. +javadoc.paragraph.preceded.block.tag=La etiqueta
no debe preceder a la etiqueta de bloque HTML ''<{0}>'', la etiqueta
debe eliminarse. javadoc.paragraph.redundant.paragraph=Redundante etiqueta
. javadoc.paragraph.tag.after=Línea de vacío debe ser seguido por etiqueta
en la línea siguiente. javadoc.parse.rule.error=Javadoc comentario en la columna {0} tiene parse error. Detalles: {1} al analizar {2} diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_fi.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_fi.properties index 24dc88d89c9..a9fd2257cd4 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_fi.properties +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_fi.properties @@ -20,6 +20,7 @@ javadoc.noPeriod=Ensimmäinen virke pitäisi päättyä aikana. javadoc.packageInfo=Puuttuu package-info.java tiedosto. javadoc.paragraph.line.before=
tag pitäisi edeltää tyhjä rivi. javadoc.paragraph.misplaced.tag=
tag olisi sijoitettava välittömästi ennen ensimmäistä sanaa, jossa ei ole tilaa jälkeen. +javadoc.paragraph.preceded.block.tag=
-tunniste ei saa edeltää HTML-lohkotunnistetta ''<{0}>'',
-tunniste tulee poistaa. javadoc.paragraph.redundant.paragraph=Turhat
tag. javadoc.paragraph.tag.after=Tyhjä rivi jälkeen olisi
tag seuraavalla rivillä. javadoc.parse.rule.error=Javadoc kommentti sarakkeessa {0} on Jäsennysvirhe. Tiedot: {1} jäsennettäessä {2} diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_fr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_fr.properties index 2156cdc16e7..b5bd0907aa5 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_fr.properties +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_fr.properties @@ -20,6 +20,7 @@ javadoc.noPeriod=La première ligne de la Javadoc doit se terminer avec un point javadoc.packageInfo=Le fichier package-info.java est manquant. javadoc.paragraph.line.before=La balise
doit être précédée d''une ligne vide. javadoc.paragraph.misplaced.tag=La balise
doit être placée immédiatement avant le premier mot, sans espace après. +javadoc.paragraph.preceded.block.tag=La balise
ne doit pas précéder la balise de bloc HTML ''<{0}>'', la balise
doit être supprimée. javadoc.paragraph.redundant.paragraph=Balise
redondante. javadoc.paragraph.tag.after=Une ligne vide doit être suivie par une balise
sur la ligne suivante. javadoc.parse.rule.error=Le commentaire Javadoc à la colonne {0} ne peut être analysé. Détails : {1} lors de l''analyse {2} diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_ja.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_ja.properties index d9aa2779eb9..83b8b33553e 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_ja.properties +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_ja.properties @@ -20,6 +20,7 @@ javadoc.noPeriod=最初の一文はピリオドで終わらなければなりま javadoc.packageInfo=package-info.javaファイルがありません。 javadoc.paragraph.line.before=
タグの前には空行を入れてください。 javadoc.paragraph.misplaced.tag=
タグは、最初の単語のすぐ前に記載してください。タグの後ろにスペースを入れないでください。 +javadoc.paragraph.preceded.block.tag=
タグを HTML ブロックタグ ''<{0}>'' の前に置くことはできません。
タグは削除する必要があります。 javadoc.paragraph.redundant.paragraph=冗長な
タグです。 javadoc.paragraph.tag.after=
タグの次の行には空行を入れてください。 javadoc.parse.rule.error={0} 桁目の Javadoc コメントでパースエラーが発生しました。詳細: {1}、{2} の解析中に発生。 diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_pt.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_pt.properties index 89ca0fc11a8..be468603b8c 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_pt.properties +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_pt.properties @@ -20,6 +20,7 @@ javadoc.noPeriod=A primeira frase do Javadoc deveria acabar num ponto final. javadoc.packageInfo=O arquivo package-info.java está faltando. javadoc.paragraph.line.before=A tag
deveria ser precedida por uma linha vazia. javadoc.paragraph.misplaced.tag=A tag
deveria ser colocada imediatamente antes da primeira palavra, sem espaço depois. +javadoc.paragraph.preceded.block.tag=A tag
não deve preceder a tag de bloco HTML ''<{0}>'', a tag
deve ser removida. javadoc.paragraph.redundant.paragraph=Tag
redundante. javadoc.paragraph.tag.after=A linha vazia deveria ser seguida por uma tag
na linha seguinte. javadoc.parse.rule.error=O comentário Javadoc na coluna {0} tem um erro sintático. Detalhes: {1} ao analisar {2} diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_ru.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_ru.properties index 9e4ef31f0ed..fdaed5d1524 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_ru.properties +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_ru.properties @@ -20,6 +20,7 @@ javadoc.noPeriod=Первое предложение Javadoc должно зак javadoc.packageInfo=Пропущен файл package-info.java. javadoc.paragraph.line.before=Перед тегом
должна быть пустая строка. javadoc.paragraph.misplaced.tag=Тег
должен стоять перед первым символом, сразу после последнего, без пробелов между ними. +javadoc.paragraph.preceded.block.tag=Тег
не должен предшествовать блочному тегу HTML ''<{0}>'', тег
следует удалить. javadoc.paragraph.redundant.paragraph=Лишний тег
. javadoc.paragraph.tag.after=После тега
должна быть пустая строка. javadoc.parse.rule.error=Ошибка синтаксического анализа Javadoc в символе {0}. Подробнее: {1} во время разбора {2} diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_tr.properties index 89f46b91054..39a91a6dc89 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_tr.properties +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_tr.properties @@ -20,6 +20,7 @@ javadoc.noPeriod=İlk cümle nokta ile bitmeli. javadoc.packageInfo=package-info.java dosyası eksik. javadoc.paragraph.line.before=
etiketi boş bir çizgi ile gelmelidir. javadoc.paragraph.misplaced.tag=
etiketi sonra boşluk, ilk kelimenin hemen önce konulmalıdır. +javadoc.paragraph.preceded.block.tag=
etiketi, HTML blok etiketi ''<{0}>'''den önce gelmemeli,
etiketi kaldırılmalıdır. javadoc.paragraph.redundant.paragraph=Yedek
etiketi. javadoc.paragraph.tag.after=Boş satır bir sonraki satırda
etiketi ile takip edilmelidir. javadoc.parse.rule.error=Sütununda Javadoc comment {0} hatası ayrıştırmak vardır. Detaylar: {1} ayrıştırılırken {2} diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_zh.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_zh.properties index e6699ffe70e..5366127d734 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_zh.properties +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_zh.properties @@ -20,6 +20,7 @@ javadoc.noPeriod=Javadoc 首句应以句号结尾。 javadoc.packageInfo=缺少 package-info.java 文件。 javadoc.paragraph.line.before=
标签前应有空行。 javadoc.paragraph.misplaced.tag=
标签应在第一个字符之前,紧邻后者,之间不允许有空格。 +javadoc.paragraph.preceded.block.tag=
标记不应位于 HTML 块标记 ''<{0}>'' 之前,应删除
标记。 javadoc.paragraph.redundant.paragraph=多余的
标签。 javadoc.paragraph.tag.after=空行后应有
标签。
javadoc.parse.rule.error=Javadoc 第 {0} 个字符解析错误。解析 {2} ,详情: {1}
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/ArrayTypeStyleCheck.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/ArrayTypeStyleCheck.xml
index 5698bd43819..364375bff51 100644
--- a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/ArrayTypeStyleCheck.xml
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/ArrayTypeStyleCheck.xml
@@ -4,14 +4,16 @@