From 81c458031f724d24e8274aa421826748dd80f4c9 Mon Sep 17 00:00:00 2001 From: Roman Ivanov Date: Sun, 31 Dec 2023 08:15:44 -0800 Subject: [PATCH] Issue #13693: migrate all naming modules to property macros --- ...checkstyle-non-main-files-suppressions.xml | 29 --- .../AbstractAccessControlNameCheck.java | 8 +- .../checks/naming/ConstantNameCheck.java | 10 +- .../naming/IllegalIdentifierNameCheck.java | 2 +- .../InterfaceTypeParameterNameCheck.java | 2 +- .../naming/LambdaParameterNameCheck.java | 2 +- .../naming/LocalFinalVariableNameCheck.java | 2 +- .../checks/naming/LocalVariableNameCheck.java | 2 +- .../checks/naming/MemberNameCheck.java | 10 +- .../checks/naming/MethodNameCheck.java | 46 ++--- .../naming/MethodTypeParameterNameCheck.java | 2 +- .../checks/naming/PackageNameCheck.java | 6 +- .../checks/naming/ParameterNameCheck.java | 2 +- .../naming/PatternVariableNameCheck.java | 2 +- .../naming/RecordComponentNameCheck.java | 2 +- .../naming/RecordTypeParameterNameCheck.java | 2 +- .../naming/StaticVariableNameCheck.java | 8 +- .../checks/naming/TypeNameCheck.java | 8 +- .../tools/checkstyle/site/SiteUtil.java | 41 ++++- .../meta/checks/naming/ConstantNameCheck.xml | 10 +- .../naming/IllegalIdentifierNameCheck.xml | 2 +- .../InterfaceTypeParameterNameCheck.xml | 2 +- .../naming/LambdaParameterNameCheck.xml | 2 +- .../naming/LocalFinalVariableNameCheck.xml | 2 +- .../checks/naming/LocalVariableNameCheck.xml | 2 +- .../meta/checks/naming/MemberNameCheck.xml | 10 +- .../meta/checks/naming/MethodNameCheck.xml | 22 +-- .../naming/MethodTypeParameterNameCheck.xml | 2 +- .../meta/checks/naming/PackageNameCheck.xml | 2 +- .../meta/checks/naming/ParameterNameCheck.xml | 2 +- .../naming/PatternVariableNameCheck.xml | 2 +- .../naming/RecordComponentNameCheck.xml | 2 +- .../naming/RecordTypeParameterNameCheck.xml | 2 +- .../checks/naming/StaticVariableNameCheck.xml | 8 +- .../meta/checks/naming/TypeNameCheck.xml | 8 +- src/xdocs/checks/naming/constantname.xml | 12 +- .../checks/naming/constantname.xml.template | 50 +----- .../checks/naming/illegalidentifiername.xml | 167 ++++++------------ .../naming/illegalidentifiername.xml.template | 138 +-------------- .../naming/interfacetypeparametername.xml | 2 +- .../interfacetypeparametername.xml.template | 20 +-- .../checks/naming/lambdaparametername.xml | 2 +- .../naming/lambdaparametername.xml.template | 20 +-- .../checks/naming/localfinalvariablename.xml | 5 +- .../localfinalvariablename.xml.template | 44 +---- src/xdocs/checks/naming/localvariablename.xml | 10 +- .../naming/localvariablename.xml.template | 32 +--- src/xdocs/checks/naming/membername.xml | 12 +- .../checks/naming/membername.xml.template | 50 +----- src/xdocs/checks/naming/methodname.xml | 28 +-- .../checks/naming/methodname.xml.template | 71 +------- .../checks/naming/methodtypeparametername.xml | 2 +- .../methodtypeparametername.xml.template | 20 +-- src/xdocs/checks/naming/packagename.xml | 2 +- .../checks/naming/packagename.xml.template | 20 +-- src/xdocs/checks/naming/parametername.xml | 12 +- .../checks/naming/parametername.xml.template | 40 +---- .../checks/naming/patternvariablename.xml | 2 +- .../naming/patternvariablename.xml.template | 20 +-- .../checks/naming/recordcomponentname.xml | 10 +- .../naming/recordcomponentname.xml.template | 24 +-- .../checks/naming/recordtypeparametername.xml | 10 +- .../recordtypeparametername.xml.template | 24 +-- .../checks/naming/staticvariablename.xml | 8 +- src/xdocs/checks/naming/typename.xml | 8 +- 65 files changed, 281 insertions(+), 850 deletions(-) diff --git a/config/checkstyle-non-main-files-suppressions.xml b/config/checkstyle-non-main-files-suppressions.xml index 50432da1eaf..360d67958c5 100644 --- a/config/checkstyle-non-main-files-suppressions.xml +++ b/config/checkstyle-non-main-files-suppressions.xml @@ -265,35 +265,6 @@ files="src[\\/]xdocs[\\/]checks[\\/]misc[\\/]uncommentedmain.xml.template"/> - - - - - - - - - - - - - - - *
    *
  • - * Property {@code applyToPackage} - Controls whether to apply the check to package-private member. + * Property {@code applyToPackage} - Control if check should apply to package-private members. * Type is {@code boolean}. * Default value is {@code true}. *
  • *
  • - * Property {@code applyToPrivate} - Controls whether to apply the check to private member. + * Property {@code applyToPrivate} - Control if check should apply to private members. * Type is {@code boolean}. * Default value is {@code true}. *
  • *
  • - * Property {@code applyToProtected} - Controls whether to apply the check to protected member. + * Property {@code applyToProtected} - Control if check should apply to protected members. * Type is {@code boolean}. * Default value is {@code true}. *
  • *
  • - * Property {@code applyToPublic} - Controls whether to apply the check to public member. + * Property {@code applyToPublic} - Control if check should apply to public members. * Type is {@code boolean}. * Default value is {@code true}. *
  • *
  • - * Property {@code format} - Specifies valid identifiers. + * Property {@code format} - Sets the pattern to match valid identifiers. * Type is {@code java.util.regex.Pattern}. * Default value is {@code "^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"}. *
  • 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 df61bebfd87..cdf8f910a26 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 @@ -36,7 +36,7 @@ *

    *
      *
    • - * Property {@code format} - Specifies valid identifiers. + * Property {@code format} - Sets the pattern to match valid identifiers. * Type is {@code java.util.regex.Pattern}. * Default value is {@code "(?i)^(?!(record|yield|var|permits|sealed|_)$).+$"}. *
    • 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 a5b00c83691..2c4c80a54ef 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 @@ -28,7 +28,7 @@ *

      *
        *
      • - * Property {@code format} - Specifies valid identifiers. + * Property {@code format} - Sets the pattern to match valid identifiers. * Type is {@code java.util.regex.Pattern}. * Default value is {@code "^[A-Z]$"}. *
      • 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 51a55c1f107..3fdaf15f17e 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 @@ -31,7 +31,7 @@ *

        *
          *
        • - * Property {@code format} - Specifies valid identifiers. + * Property {@code format} - Sets the pattern to match valid identifiers. * Type is {@code java.util.regex.Pattern}. * Default value is {@code "^[a-z][a-zA-Z0-9]*$"}. *
        • 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 a0aa75cf099..63778c0554b 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 @@ -32,7 +32,7 @@ *

          *
            *
          • - * Property {@code format} - Specifies valid identifiers. + * Property {@code format} - Sets the pattern to match valid identifiers. * Type is {@code java.util.regex.Pattern}. * Default value is {@code "^[a-z][a-zA-Z0-9]*$"}. *
          • 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 d74e2d8c8f3..71ca0d96e47 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 @@ -39,7 +39,7 @@ * Default value is {@code false}. * *
          • - * Property {@code format} - Specifies valid identifiers. + * Property {@code format} - Sets the pattern to match valid identifiers. * Type is {@code java.util.regex.Pattern}. * Default value is {@code "^[a-z][a-zA-Z0-9]*$"}. *
          • diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MemberNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MemberNameCheck.java index 32a01385e90..0937b3cfe28 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MemberNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MemberNameCheck.java @@ -29,27 +29,27 @@ *

            *
              *
            • - * Property {@code applyToPackage} - Controls whether to apply the check to package-private member. + * Property {@code applyToPackage} - Control if check should apply to package-private members. * Type is {@code boolean}. * Default value is {@code true}. *
            • *
            • - * Property {@code applyToPrivate} - Controls whether to apply the check to private member. + * Property {@code applyToPrivate} - Control if check should apply to private members. * Type is {@code boolean}. * Default value is {@code true}. *
            • *
            • - * Property {@code applyToProtected} - Controls whether to apply the check to protected member. + * Property {@code applyToProtected} - Control if check should apply to protected members. * Type is {@code boolean}. * Default value is {@code true}. *
            • *
            • - * Property {@code applyToPublic} - Controls whether to apply the check to public member. + * Property {@code applyToPublic} - Control if check should apply to public members. * Type is {@code boolean}. * Default value is {@code true}. *
            • *
            • - * Property {@code format} - Specifies valid identifiers. + * Property {@code format} - Sets the pattern to match valid identifiers. * Type is {@code java.util.regex.Pattern}. * Default value is {@code "^[a-z][a-zA-Z0-9]*$"}. *
            • diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MethodNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MethodNameCheck.java index 94318c63854..cde9f4ca078 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MethodNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MethodNameCheck.java @@ -38,40 +38,34 @@ * *
                *
              • - * Property {@code allowClassName} - Controls whether to allow a method name to have the same name - * as the residing class name. This is not to be confused with a constructor. An easy mistake is - * to place a return type on a constructor declaration which turns it into a method. For example: - *
                - * class MyClass {
                - *     public void MyClass() {} //this is a method
                - *     public MyClass() {} //this is a constructor
                - * }
                - * 
                + * Property {@code allowClassName} - Control whether to allow a method name to have the same name + * as the enclosing class name. Setting this property {@code false} helps to avoid + * confusion between constructors and methods. * Type is {@code boolean}. * Default value is {@code false}. *
              • *
              • - * Property {@code applyToPackage} - Controls whether to apply the check to package-private member. + * Property {@code applyToPackage} - Control if check should apply to package-private members. * Type is {@code boolean}. * Default value is {@code true}. *
              • *
              • - * Property {@code applyToPrivate} - Controls whether to apply the check to private member. + * Property {@code applyToPrivate} - Control if check should apply to private members. * Type is {@code boolean}. * Default value is {@code true}. *
              • *
              • - * Property {@code applyToProtected} - Controls whether to apply the check to protected member. + * Property {@code applyToProtected} - Control if check should apply to protected members. * Type is {@code boolean}. * Default value is {@code true}. *
              • *
              • - * Property {@code applyToPublic} - Controls whether to apply the check to public member. + * Property {@code applyToPublic} - Control if check should apply to public members. * Type is {@code boolean}. * Default value is {@code true}. *
              • *
              • - * Property {@code format} - Specifies valid identifiers. + * Property {@code format} - Sets the pattern to match valid identifiers. * Type is {@code java.util.regex.Pattern}. * Default value is {@code "^[a-z][a-zA-Z0-9]*$"}. *
              • @@ -103,15 +97,9 @@ public class MethodNameCheck public static final String MSG_KEY = "method.name.equals.class.name"; /** - * Controls whether to allow a method name to have the same name as the residing class name. - * This is not to be confused with a constructor. An easy mistake is to place a return type on - * a constructor declaration which turns it into a method. For example: - *
                -     * class MyClass {
                -     *     public void MyClass() {} //this is a method
                -     *     public MyClass() {} //this is a constructor
                -     * }
                -     * 
                + * Control whether to allow a method name to have the same name as the enclosing class name. + * Setting this property {@code false} helps to avoid confusion + * between constructors and methods. */ private boolean allowClassName; @@ -164,15 +152,9 @@ public void visitToken(DetailAST ast) { } /** - * Setter to controls whether to allow a method name to have the same name as the residing - * class name. This is not to be confused with a constructor. An easy mistake is to place - * a return type on a constructor declaration which turns it into a method. For example: - *
                -     * class MyClass {
                -     *     public void MyClass() {} //this is a method
                -     *     public MyClass() {} //this is a constructor
                -     * }
                -     * 
                + * Setter to control whether to allow a method name to have the same name + * as the enclosing class name. Setting this property {@code false} + * helps to avoid confusion between constructors and methods. * * @param allowClassName true to allow false to disallow * @since 5.0 diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MethodTypeParameterNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MethodTypeParameterNameCheck.java index 52186ee7239..0ebbc405a3d 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MethodTypeParameterNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MethodTypeParameterNameCheck.java @@ -28,7 +28,7 @@ *

                *
                  *
                • - * Property {@code format} - Specifies valid identifiers. + * Property {@code format} - Sets the pattern to match valid identifiers. * Type is {@code java.util.regex.Pattern}. * Default value is {@code "^[A-Z]$"}. *
                • diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/PackageNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/PackageNameCheck.java index 83d6f73e1ba..f2b51bd97d8 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/PackageNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/PackageNameCheck.java @@ -42,7 +42,7 @@ *

                  *
                    *
                  • - * Property {@code format} - Specifies valid identifiers. + * Property {@code format} - Control the pattern to match valid identifiers. * Type is {@code java.util.regex.Pattern}. * Default value is {@code "^[a-z]+(\.[a-zA-Z_]\w*)*$"}. *
                  • @@ -71,14 +71,14 @@ public class PackageNameCheck */ public static final String MSG_KEY = "name.invalidPattern"; - /** Specifies valid identifiers. */ + /** Control the pattern to match valid identifiers. */ // Uppercase letters seem rather uncommon, but they're allowed in // https://docs.oracle.com/javase/specs/ // second_edition/html/packages.doc.html#40169 private Pattern format = Pattern.compile("^[a-z]+(\\.[a-zA-Z_]\\w*)*$"); /** - * Setter to specifies valid identifiers. + * Setter to control the pattern to match valid identifiers. * * @param pattern the new pattern * @since 3.0 diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ParameterNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ParameterNameCheck.java index 5f9a68821ab..f2f724cd484 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ParameterNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ParameterNameCheck.java @@ -50,7 +50,7 @@ * Default value is {@code public, protected, package, private}. * *
                  • - * Property {@code format} - Specifies valid identifiers. + * Property {@code format} - Sets the pattern to match valid identifiers. * Type is {@code java.util.regex.Pattern}. * Default value is {@code "^[a-z][a-zA-Z0-9]*$"}. *
                  • diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/PatternVariableNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/PatternVariableNameCheck.java index f21aae7ee35..9268cef0831 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/PatternVariableNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/PatternVariableNameCheck.java @@ -28,7 +28,7 @@ *

                    *
                      *
                    • - * Property {@code format} - Specifies valid identifiers. + * Property {@code format} - Sets the pattern to match valid identifiers. * Type is {@code java.util.regex.Pattern}. * Default value is {@code "^[a-z][a-zA-Z0-9]*$"}. *
                    • diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/RecordComponentNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/RecordComponentNameCheck.java index 215e3101df0..b154410ab69 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/RecordComponentNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/RecordComponentNameCheck.java @@ -28,7 +28,7 @@ *

                      *
                        *
                      • - * Property {@code format} - Specifies valid identifiers. + * Property {@code format} - Sets the pattern to match valid identifiers. * Type is {@code java.util.regex.Pattern}. * Default value is {@code "^[a-z][a-zA-Z0-9]*$"}. *
                      • diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/RecordTypeParameterNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/RecordTypeParameterNameCheck.java index ae9db51c25d..567ae76a197 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/RecordTypeParameterNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/RecordTypeParameterNameCheck.java @@ -28,7 +28,7 @@ *

                        *
                          *
                        • - * Property {@code format} - Specifies valid identifiers. + * Property {@code format} - Sets the pattern to match valid identifiers. * Type is {@code java.util.regex.Pattern}. * Default value is {@code "^[A-Z]$"}. *
                        • diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/StaticVariableNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/StaticVariableNameCheck.java index e0e916c3efb..d4b90f85290 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/StaticVariableNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/StaticVariableNameCheck.java @@ -29,24 +29,24 @@ *

                          *
                            *
                          • - * Property {@code applyToPackage} - Control whether we should apply the check to package-private + * Property {@code applyToPackage} - Control if check should apply to package-private * members. * Type is {@code boolean}. * Default value is {@code true}. *
                          • *
                          • - * Property {@code applyToPrivate} - Control whether we should apply the check to private members. + * Property {@code applyToPrivate} - Control if check should apply to private members. * Type is {@code boolean}. * Default value is {@code true}. *
                          • *
                          • - * Property {@code applyToProtected} - Control whether we should apply the check to protected + * Property {@code applyToProtected} - Control if check should apply to protected * members. * Type is {@code boolean}. * Default value is {@code true}. *
                          • *
                          • - * Property {@code applyToPublic} - Control whether we should apply the check to public members. + * Property {@code applyToPublic} - Control if check should apply to public members. * Type is {@code boolean}. * Default value is {@code true}. *
                          • diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/TypeNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/TypeNameCheck.java index 3e039a985d3..38e07ff798d 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/TypeNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/TypeNameCheck.java @@ -28,24 +28,24 @@ *

                            *
                              *
                            • - * Property {@code applyToPackage} - Control whether we should apply the check to package-private + * Property {@code applyToPackage} - Control if check should apply to package-private * members. * Type is {@code boolean}. * Default value is {@code true}. *
                            • *
                            • - * Property {@code applyToPrivate} - Control whether we should apply the check to private members. + * Property {@code applyToPrivate} - Control if check should apply to private members. * Type is {@code boolean}. * Default value is {@code true}. *
                            • *
                            • - * Property {@code applyToProtected} - Control whether we should apply the check to protected + * Property {@code applyToProtected} - Control if check should apply to protected * members. * Type is {@code boolean}. * Default value is {@code true}. *
                            • *
                            • - * Property {@code applyToPublic} - Control whether we should apply the check to public members. + * Property {@code applyToPublic} - Control if check should apply to public members. * Type is {@code boolean}. * Default value is {@code true}. *
                            • diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/site/SiteUtil.java b/src/main/java/com/puppycrawl/tools/checkstyle/site/SiteUtil.java index 492f4c46df2..29666685800 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/site/SiteUtil.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/site/SiteUtil.java @@ -189,6 +189,11 @@ public final class SiteUtil { */ private static final String V824 = "8.24"; + /** + * Frequent version. + */ + private static final String VERSION_8_36 = "8.36"; + /** * Frequent version. */ @@ -204,6 +209,11 @@ public final class SiteUtil { */ private static final String VERSION_5_7 = "5.7"; + /** + * Frequent version. + */ + private static final String VERSION_5_1 = "5.1"; + /** * Frequent version. */ @@ -213,6 +223,9 @@ public final class SiteUtil { * Map of properties whose since version is different from module version but * are not specified in code because they are inherited from their super class(es). * Until #14052. + * + * @noinspection JavacQuirks + * @noinspectionreason JavacQuirks until #14052 */ private static final Map SINCE_VERSION_FOR_INHERITED_PROPERTY = Map.ofEntries( Map.entry("MissingDeprecatedCheck.violateExecutionOnNonTightHtml", V824), @@ -242,7 +255,8 @@ public final class SiteUtil { Map.entry("JavadocBlockTagLocationCheck.violateExecutionOnNonTightHtml", V824), Map.entry("JavadocMissingLeadingAsteriskCheck.violateExecutionOnNonTightHtml", "8.38"), Map.entry( - "RequireEmptyLineBeforeBlockTagGroupCheck.violateExecutionOnNonTightHtml", "8.36"), + "RequireEmptyLineBeforeBlockTagGroupCheck.violateExecutionOnNonTightHtml", + VERSION_8_36), Map.entry("ParenPadCheck.option", VERSION_3_0), Map.entry("TypecastParenPadCheck.option", VERSION_3_2), Map.entry("FileLengthCheck.fileExtensions", VERSION_5_0), @@ -260,6 +274,31 @@ public final class SiteUtil { Map.entry("RegexpSinglelineCheck.fileExtensions", VERSION_5_0), Map.entry("ClassTypeParameterNameCheck.format", VERSION_5_0), Map.entry("CatchParameterNameCheck.format", "6.14"), + Map.entry("LambdaParameterNameCheck.format", "8.11"), + Map.entry("IllegalIdentifierNameCheck.format", VERSION_8_36), + Map.entry("ConstantNameCheck.format", VERSION_3_0), + Map.entry("ConstantNameCheck.applyToPackage", VERSION_5_0), + Map.entry("ConstantNameCheck.applyToPrivate", VERSION_5_0), + Map.entry("ConstantNameCheck.applyToProtected", VERSION_5_0), + Map.entry("ConstantNameCheck.applyToPublic", VERSION_5_0), + Map.entry("InterfaceTypeParameterNameCheck.format", "5.8"), + Map.entry("LocalFinalVariableNameCheck.format", VERSION_3_0), + Map.entry("LocalVariableNameCheck.format", VERSION_3_0), + Map.entry("MemberNameCheck.format", VERSION_3_0), + Map.entry("MemberNameCheck.applyToPackage", VERSION_3_4), + Map.entry("MemberNameCheck.applyToPrivate", VERSION_3_4), + Map.entry("MemberNameCheck.applyToProtected", VERSION_3_4), + Map.entry("MemberNameCheck.applyToPublic", VERSION_3_4), + Map.entry("MethodNameCheck.format", VERSION_3_0), + Map.entry("MethodNameCheck.applyToPackage", VERSION_5_1), + Map.entry("MethodNameCheck.applyToPrivate", VERSION_5_1), + Map.entry("MethodNameCheck.applyToProtected", VERSION_5_1), + Map.entry("MethodNameCheck.applyToPublic", VERSION_5_1), + Map.entry("MethodTypeParameterNameCheck.format", VERSION_5_0), + Map.entry("ParameterNameCheck.format", VERSION_3_0), + Map.entry("PatternVariableNameCheck.format", VERSION_8_36), + Map.entry("RecordTypeParameterNameCheck.format", VERSION_8_36), + Map.entry("RecordComponentNameCheck.format", "8.40"), Map.entry("TypeNameCheck.format", VERSION_3_0) ); diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/ConstantNameCheck.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/ConstantNameCheck.xml index 85117d06808..ce788900ac4 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/ConstantNameCheck.xml +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/ConstantNameCheck.xml @@ -13,21 +13,21 @@ </p> - Controls whether to apply the check to package-private member. + Control if check should apply to package-private members. - Controls whether to apply the check to private member. + Control if check should apply to private members. - Controls whether to apply the check to protected member. + Control if check should apply to protected members. - Controls whether to apply the check to public member. + Control if check should apply to public members. - Specifies valid identifiers. + Sets the pattern to match valid identifiers. diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/IllegalIdentifierNameCheck.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/IllegalIdentifierNameCheck.xml index 9e17fb9ccc4..80abaef2458 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/IllegalIdentifierNameCheck.xml +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/IllegalIdentifierNameCheck.xml @@ -17,7 +17,7 @@ - Specifies valid identifiers. + Sets the pattern to match valid identifiers. - Specifies valid identifiers. + Sets the pattern to match valid identifiers. diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/LambdaParameterNameCheck.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/LambdaParameterNameCheck.xml index a876b88de0c..7c519aafa81 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/LambdaParameterNameCheck.xml +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/LambdaParameterNameCheck.xml @@ -11,7 +11,7 @@ - Specifies valid identifiers. + Sets the pattern to match valid identifiers. diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/LocalFinalVariableNameCheck.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/LocalFinalVariableNameCheck.xml index 614e509c74c..2b8b4a645a9 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/LocalFinalVariableNameCheck.xml +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/LocalFinalVariableNameCheck.xml @@ -13,7 +13,7 @@ - Specifies valid identifiers. + Sets the pattern to match valid identifiers. - Specifies valid identifiers. + Sets the pattern to match valid identifiers. diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/MemberNameCheck.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/MemberNameCheck.xml index d29ddf7e330..88aa5d7a234 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/MemberNameCheck.xml +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/MemberNameCheck.xml @@ -9,21 +9,21 @@ </p> - Controls whether to apply the check to package-private member. + Control if check should apply to package-private members. - Controls whether to apply the check to private member. + Control if check should apply to private members. - Controls whether to apply the check to protected member. + Control if check should apply to protected members. - Controls whether to apply the check to public member. + Control if check should apply to public members. - Specifies valid identifiers. + Sets the pattern to match valid identifiers. diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/MethodNameCheck.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/MethodNameCheck.xml index 2df037c68f7..917ec4ebc2d 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/MethodNameCheck.xml +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/MethodNameCheck.xml @@ -17,32 +17,26 @@ </p> - Controls whether to allow a method name to have the same name - as the residing class name. This is not to be confused with a constructor. An easy mistake is - to place a return type on a constructor declaration which turns it into a method. For example: - <pre> - class MyClass { - public void MyClass() {} //this is a method - public MyClass() {} //this is a constructor - } - </pre> + Control whether to allow a method name to have the same name + as the enclosing class name. Setting this property {@code false} helps to avoid + confusion between constructors and methods. - Controls whether to apply the check to package-private member. + Control if check should apply to package-private members. - Controls whether to apply the check to private member. + Control if check should apply to private members. - Controls whether to apply the check to protected member. + Control if check should apply to protected members. - Controls whether to apply the check to public member. + Control if check should apply to public members. - Specifies valid identifiers. + Sets the pattern to match valid identifiers. diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/MethodTypeParameterNameCheck.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/MethodTypeParameterNameCheck.xml index 1fb475c81ab..8860416506b 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/MethodTypeParameterNameCheck.xml +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/MethodTypeParameterNameCheck.xml @@ -11,7 +11,7 @@ - Specifies valid identifiers. + Sets the pattern to match valid identifiers. diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/PackageNameCheck.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/PackageNameCheck.xml index e5f29d16709..e5bfd02567c 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/PackageNameCheck.xml +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/PackageNameCheck.xml @@ -20,7 +20,7 @@ - Specifies valid identifiers. + Control the pattern to match valid identifiers. diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/ParameterNameCheck.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/ParameterNameCheck.xml index 151fd85c04a..5db3844876a 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/ParameterNameCheck.xml +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/ParameterNameCheck.xml @@ -29,7 +29,7 @@ - Specifies valid identifiers. + Sets the pattern to match valid identifiers. Allows to skip methods with Override annotation from diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/PatternVariableNameCheck.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/PatternVariableNameCheck.xml index 81e042223f1..44e35ac0cd2 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/PatternVariableNameCheck.xml +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/PatternVariableNameCheck.xml @@ -11,7 +11,7 @@ - Specifies valid identifiers. + Sets the pattern to match valid identifiers. diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/RecordComponentNameCheck.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/RecordComponentNameCheck.xml index f0d90866d15..4eefa6ce8bf 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/RecordComponentNameCheck.xml +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/RecordComponentNameCheck.xml @@ -11,7 +11,7 @@ - Specifies valid identifiers. + Sets the pattern to match valid identifiers. diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/RecordTypeParameterNameCheck.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/RecordTypeParameterNameCheck.xml index 067259ab6df..90600f8bfbf 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/RecordTypeParameterNameCheck.xml +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/RecordTypeParameterNameCheck.xml @@ -11,7 +11,7 @@ - Specifies valid identifiers. + Sets the pattern to match valid identifiers. diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/StaticVariableNameCheck.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/StaticVariableNameCheck.xml index b1ad7fa0fed..170e82e52cf 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/StaticVariableNameCheck.xml +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/naming/StaticVariableNameCheck.xml @@ -9,18 +9,18 @@ </p> - Control whether we should apply the check to package-private + Control if check should apply to package-private members. - Control whether we should apply the check to private members. + Control if check should apply to private members. - Control whether we should apply the check to protected + Control if check should apply to protected members. - Control whether we should apply the check to public members. + Control if check should apply to public members. - Control whether we should apply the check to package-private + Control if check should apply to package-private members. - Control whether we should apply the check to private members. + Control if check should apply to private members. - Control whether we should apply the check to protected + Control if check should apply to protected members. - Control whether we should apply the check to public members. + Control if check should apply to public members. applyToPackage - - Controls whether to apply the check to package-private member. - + Control if check should apply to package-private members. boolean true 5.0 applyToPrivate - Controls whether to apply the check to private member. + Control if check should apply to private members. boolean true 5.0 applyToProtected - Controls whether to apply the check to protected member. + Control if check should apply to protected members. boolean true 5.0 applyToPublic - Controls whether to apply the check to public member. + Control if check should apply to public members. boolean true 5.0 format - Specifies valid identifiers. + Sets the pattern to match valid identifiers. Pattern "^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$" 3.0 diff --git a/src/xdocs/checks/naming/constantname.xml.template b/src/xdocs/checks/naming/constantname.xml.template index 6d98b13ff80..ac86748baf1 100644 --- a/src/xdocs/checks/naming/constantname.xml.template +++ b/src/xdocs/checks/naming/constantname.xml.template @@ -19,52 +19,10 @@
                              - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                              namedescriptiontypedefault valuesince
                              applyToPackage - Controls whether to apply the check to package-private member. - booleantrue5.0
                              applyToPrivateControls whether to apply the check to private member.booleantrue5.0
                              applyToProtectedControls whether to apply the check to protected member.booleantrue5.0
                              applyToPublicControls whether to apply the check to public member.booleantrue5.0
                              formatSpecifies valid identifiers.Pattern"^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"3.0
                              + + +
                              diff --git a/src/xdocs/checks/naming/illegalidentifiername.xml b/src/xdocs/checks/naming/illegalidentifiername.xml index d040bcd8303..fa3883899bf 100644 --- a/src/xdocs/checks/naming/illegalidentifiername.xml +++ b/src/xdocs/checks/naming/illegalidentifiername.xml @@ -33,126 +33,71 @@ format - Specifies valid identifiers. - - Pattern - - - "(?i)^(?!(record|yield|var|permits|sealed|_)$).+$" - + Sets the pattern to match valid identifiers. + Pattern + "(?i)^(?!(record|yield|var|permits|sealed|_)$).+$" 8.36 tokens tokens to check - - subset of tokens + subset of tokens - CLASS_DEF - - , - - INTERFACE_DEF - - , - - ENUM_DEF - - , - - ANNOTATION_DEF - - , - - ANNOTATION_FIELD_DEF - - , - - PARAMETER_DEF - - , - - VARIABLE_DEF - - , - - METHOD_DEF - - , - - ENUM_CONSTANT_DEF - - , - - PATTERN_VARIABLE_DEF - - , - - RECORD_DEF - - , - - RECORD_COMPONENT_DEF - - , - - LAMBDA - - . + CLASS_DEF + , + INTERFACE_DEF + , + ENUM_DEF + , + ANNOTATION_DEF + , + ANNOTATION_FIELD_DEF + , + PARAMETER_DEF + , + VARIABLE_DEF + , + METHOD_DEF + , + ENUM_CONSTANT_DEF + , + PATTERN_VARIABLE_DEF + , + RECORD_DEF + , + RECORD_COMPONENT_DEF + , + LAMBDA + . - CLASS_DEF - - , - - INTERFACE_DEF - - , - - ENUM_DEF - - , - - ANNOTATION_DEF - - , - - ANNOTATION_FIELD_DEF - - , - - PARAMETER_DEF - - , - - VARIABLE_DEF - - , - - METHOD_DEF - - , - - ENUM_CONSTANT_DEF - - , - - PATTERN_VARIABLE_DEF - - , - - RECORD_DEF - - , - - RECORD_COMPONENT_DEF - - , - - LAMBDA - - . + CLASS_DEF + , + INTERFACE_DEF + , + ENUM_DEF + , + ANNOTATION_DEF + , + ANNOTATION_FIELD_DEF + , + PARAMETER_DEF + , + VARIABLE_DEF + , + METHOD_DEF + , + ENUM_CONSTANT_DEF + , + PATTERN_VARIABLE_DEF + , + RECORD_DEF + , + RECORD_COMPONENT_DEF + , + LAMBDA + . 8.36 diff --git a/src/xdocs/checks/naming/illegalidentifiername.xml.template b/src/xdocs/checks/naming/illegalidentifiername.xml.template index 1446aa27d16..2fd36b35e6f 100644 --- a/src/xdocs/checks/naming/illegalidentifiername.xml.template +++ b/src/xdocs/checks/naming/illegalidentifiername.xml.template @@ -23,140 +23,10 @@
                              - - - - - - - - - - - - - - - - - - - - - - -
                              namedescriptiontypedefault valuesince
                              formatSpecifies valid identifiers. - Pattern - - "(?i)^(?!(record|yield|var|permits|sealed|_)$).+$" - 8.36
                              tokenstokens to check - subset of tokens - - CLASS_DEF - - , - - INTERFACE_DEF - - , - - ENUM_DEF - - , - - ANNOTATION_DEF - - , - - ANNOTATION_FIELD_DEF - - , - - PARAMETER_DEF - - , - - VARIABLE_DEF - - , - - METHOD_DEF - - , - - ENUM_CONSTANT_DEF - - , - - PATTERN_VARIABLE_DEF - - , - - RECORD_DEF - - , - - RECORD_COMPONENT_DEF - - , - - LAMBDA - - . - - - CLASS_DEF - - , - - INTERFACE_DEF - - , - - ENUM_DEF - - , - - ANNOTATION_DEF - - , - - ANNOTATION_FIELD_DEF - - , - - PARAMETER_DEF - - , - - VARIABLE_DEF - - , - - METHOD_DEF - - , - - ENUM_CONSTANT_DEF - - , - - PATTERN_VARIABLE_DEF - - , - - RECORD_DEF - - , - - RECORD_COMPONENT_DEF - - , - - LAMBDA - - . - 8.36
                              + + +
                              diff --git a/src/xdocs/checks/naming/interfacetypeparametername.xml b/src/xdocs/checks/naming/interfacetypeparametername.xml index cc6595f21bf..4eda96b02eb 100644 --- a/src/xdocs/checks/naming/interfacetypeparametername.xml +++ b/src/xdocs/checks/naming/interfacetypeparametername.xml @@ -26,7 +26,7 @@ format - Specifies valid identifiers. + Sets the pattern to match valid identifiers. Pattern "^[A-Z]$" 5.8 diff --git a/src/xdocs/checks/naming/interfacetypeparametername.xml.template b/src/xdocs/checks/naming/interfacetypeparametername.xml.template index 02e2e90cbe8..27393c2b0b0 100644 --- a/src/xdocs/checks/naming/interfacetypeparametername.xml.template +++ b/src/xdocs/checks/naming/interfacetypeparametername.xml.template @@ -16,22 +16,10 @@
                              - - - - - - - - - - - - - - - -
                              namedescriptiontypedefault valuesince
                              formatSpecifies valid identifiers.Pattern"^[A-Z]$"5.8
                              + + +
                              diff --git a/src/xdocs/checks/naming/lambdaparametername.xml b/src/xdocs/checks/naming/lambdaparametername.xml index afd25a46ddf..bfa96704139 100644 --- a/src/xdocs/checks/naming/lambdaparametername.xml +++ b/src/xdocs/checks/naming/lambdaparametername.xml @@ -26,7 +26,7 @@ format - Specifies valid identifiers. + Sets the pattern to match valid identifiers. Pattern "^[a-z][a-zA-Z0-9]*$" 8.11 diff --git a/src/xdocs/checks/naming/lambdaparametername.xml.template b/src/xdocs/checks/naming/lambdaparametername.xml.template index 75b2919f726..700bd2b4c6f 100644 --- a/src/xdocs/checks/naming/lambdaparametername.xml.template +++ b/src/xdocs/checks/naming/lambdaparametername.xml.template @@ -16,22 +16,10 @@
                              - - - - - - - - - - - - - - - -
                              namedescriptiontypedefault valuesince
                              formatSpecifies valid identifiers.Pattern"^[a-z][a-zA-Z0-9]*$"8.11
                              + + +
                              diff --git a/src/xdocs/checks/naming/localfinalvariablename.xml b/src/xdocs/checks/naming/localfinalvariablename.xml index bc8cd441522..24d8dd5eb2b 100644 --- a/src/xdocs/checks/naming/localfinalvariablename.xml +++ b/src/xdocs/checks/naming/localfinalvariablename.xml @@ -28,7 +28,7 @@ format - Specifies valid identifiers. + Sets the pattern to match valid identifiers. Pattern "^[a-z][a-zA-Z0-9]*$" 3.0 @@ -36,8 +36,7 @@ tokens tokens to check - - subset of tokens + subset of tokens VARIABLE_DEF , diff --git a/src/xdocs/checks/naming/localfinalvariablename.xml.template b/src/xdocs/checks/naming/localfinalvariablename.xml.template index 8f1567a3fc7..690341bbc59 100644 --- a/src/xdocs/checks/naming/localfinalvariablename.xml.template +++ b/src/xdocs/checks/naming/localfinalvariablename.xml.template @@ -18,46 +18,10 @@
                              - - - - - - - - - - - - - - - - - - - - - - -
                              namedescriptiontypedefault valuesince
                              formatSpecifies valid identifiers.Pattern"^[a-z][a-zA-Z0-9]*$"3.0
                              tokenstokens to check - subset of tokens - - VARIABLE_DEF - , - PARAMETER_DEF - , - RESOURCE - . - - - VARIABLE_DEF - , - PARAMETER_DEF - , - RESOURCE - . - 3.0
                              + + +
                              diff --git a/src/xdocs/checks/naming/localvariablename.xml b/src/xdocs/checks/naming/localvariablename.xml index 5ee9e3819dd..52045da9af3 100644 --- a/src/xdocs/checks/naming/localvariablename.xml +++ b/src/xdocs/checks/naming/localvariablename.xml @@ -27,19 +27,15 @@ allowOneCharVarInForLoop - - Allow one character variable name in -
                              - initialization expressions in FOR loop if one char variable name - is prohibited by {@code format} regexp. - + Allow one character variable name in + initialization expressions in FOR loop if one char variable name is prohibited by format regexp. boolean false 5.8 format - Specifies valid identifiers. + Sets the pattern to match valid identifiers. Pattern "^[a-z][a-zA-Z0-9]*$" 3.0 diff --git a/src/xdocs/checks/naming/localvariablename.xml.template b/src/xdocs/checks/naming/localvariablename.xml.template index d7602154648..35ff7f4930a 100644 --- a/src/xdocs/checks/naming/localvariablename.xml.template +++ b/src/xdocs/checks/naming/localvariablename.xml.template @@ -17,34 +17,10 @@
                              - - - - - - - - - - - - - - - - - - - - - - -
                              namedescriptiontypedefault valuesince
                              allowOneCharVarInForLoop - Allow one character variable name in - - initialization expressions in FOR loop if one char variable name - is prohibited by {@code format} regexp. - booleanfalse5.8
                              formatSpecifies valid identifiers.Pattern"^[a-z][a-zA-Z0-9]*$"3.0
                              + + +
                              diff --git a/src/xdocs/checks/naming/membername.xml b/src/xdocs/checks/naming/membername.xml index ed11a04016a..df677b66136 100644 --- a/src/xdocs/checks/naming/membername.xml +++ b/src/xdocs/checks/naming/membername.xml @@ -26,37 +26,35 @@ applyToPackage - - Controls whether to apply the check to package-private member. - + Control if check should apply to package-private members. boolean true 3.4 applyToPrivate - Controls whether to apply the check to private member. + Control if check should apply to private members. boolean true 3.4 applyToProtected - Controls whether to apply the check to protected member. + Control if check should apply to protected members. boolean true 3.4 applyToPublic - Controls whether to apply the check to public member. + Control if check should apply to public members. boolean true 3.4 format - Specifies valid identifiers. + Sets the pattern to match valid identifiers. Pattern "^[a-z][a-zA-Z0-9]*$" 3.0 diff --git a/src/xdocs/checks/naming/membername.xml.template b/src/xdocs/checks/naming/membername.xml.template index 1b6b783daf3..7cf24f2ff1f 100644 --- a/src/xdocs/checks/naming/membername.xml.template +++ b/src/xdocs/checks/naming/membername.xml.template @@ -16,52 +16,10 @@
                              - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                              namedescriptiontypedefault valuesince
                              applyToPackage - Controls whether to apply the check to package-private member. - booleantrue3.4
                              applyToPrivateControls whether to apply the check to private member.booleantrue3.4
                              applyToProtectedControls whether to apply the check to protected member.booleantrue3.4
                              applyToPublicControls whether to apply the check to public member.booleantrue3.4
                              formatSpecifies valid identifiers.Pattern"^[a-z][a-zA-Z0-9]*$"3.0
                              + + +
                              diff --git a/src/xdocs/checks/naming/methodname.xml b/src/xdocs/checks/naming/methodname.xml index a05236b6315..2efd347d297 100644 --- a/src/xdocs/checks/naming/methodname.xml +++ b/src/xdocs/checks/naming/methodname.xml @@ -34,58 +34,42 @@ allowClassName - - Controls whether to allow a method name to have the same - name as the residing class name. This is not to be confused - with a constructor. An easy mistake is to place a return - type on a constructor declaration which turns it into a - method. For example: -
                              -
                              -class MyClass {
                              -    public void MyClass() {} //this is a method
                              -    public MyClass() {} //this is a constructor
                              -}
                              -                  
                              -
                              - + Control whether to allow a method name to have the same name as the enclosing class name. Setting this property false helps to avoid confusion between constructors and methods. boolean false 5.0 applyToPackage - - Controls whether to apply the check to package-private member. - + Control if check should apply to package-private members. boolean true 5.1 applyToPrivate - Controls whether to apply the check to private member. + Control if check should apply to private members. boolean true 5.1 applyToProtected - Controls whether to apply the check to protected member. + Control if check should apply to protected members. boolean true 5.1 applyToPublic - Controls whether to apply the check to public member. + Control if check should apply to public members. boolean true 5.1 format - Specifies valid identifiers. + Sets the pattern to match valid identifiers. Pattern "^[a-z][a-zA-Z0-9]*$" 3.0 diff --git a/src/xdocs/checks/naming/methodname.xml.template b/src/xdocs/checks/naming/methodname.xml.template index 564413c6883..3e8ff62f5ee 100644 --- a/src/xdocs/checks/naming/methodname.xml.template +++ b/src/xdocs/checks/naming/methodname.xml.template @@ -24,73 +24,10 @@
                              - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                              namedescriptiontypedefault valuesince
                              allowClassName - Controls whether to allow a method name to have the same - name as the residing class name. This is not to be confused - with a constructor. An easy mistake is to place a return - type on a constructor declaration which turns it into a - method. For example: -
                              -
                              -class MyClass {
                              -    public void MyClass() {} //this is a method
                              -    public MyClass() {} //this is a constructor
                              -}
                              -                  
                              -
                              -
                              booleanfalse5.0
                              applyToPackage - Controls whether to apply the check to package-private member. - booleantrue5.1
                              applyToPrivateControls whether to apply the check to private member.booleantrue5.1
                              applyToProtectedControls whether to apply the check to protected member.booleantrue5.1
                              applyToPublicControls whether to apply the check to public member.booleantrue5.1
                              formatSpecifies valid identifiers.Pattern"^[a-z][a-zA-Z0-9]*$"3.0
                              + + +
                              diff --git a/src/xdocs/checks/naming/methodtypeparametername.xml b/src/xdocs/checks/naming/methodtypeparametername.xml index a8371aded7f..160ac9a4aae 100644 --- a/src/xdocs/checks/naming/methodtypeparametername.xml +++ b/src/xdocs/checks/naming/methodtypeparametername.xml @@ -26,7 +26,7 @@ format - Specifies valid identifiers. + Sets the pattern to match valid identifiers. Pattern "^[A-Z]$" 5.0 diff --git a/src/xdocs/checks/naming/methodtypeparametername.xml.template b/src/xdocs/checks/naming/methodtypeparametername.xml.template index f79f53752ae..3009c8fb0fc 100644 --- a/src/xdocs/checks/naming/methodtypeparametername.xml.template +++ b/src/xdocs/checks/naming/methodtypeparametername.xml.template @@ -16,22 +16,10 @@
                              - - - - - - - - - - - - - - - -
                              namedescriptiontypedefault valuesince
                              formatSpecifies valid identifiers.Pattern"^[A-Z]$"5.0
                              + + +
                              diff --git a/src/xdocs/checks/naming/packagename.xml b/src/xdocs/checks/naming/packagename.xml index 9da187191a3..5a6f443f5b4 100644 --- a/src/xdocs/checks/naming/packagename.xml +++ b/src/xdocs/checks/naming/packagename.xml @@ -36,7 +36,7 @@ format - Specifies valid identifiers. + Control the pattern to match valid identifiers. Pattern "^[a-z]+(\.[a-zA-Z_]\w*)*$" 3.0 diff --git a/src/xdocs/checks/naming/packagename.xml.template b/src/xdocs/checks/naming/packagename.xml.template index 488adb6e38d..717acc3acec 100644 --- a/src/xdocs/checks/naming/packagename.xml.template +++ b/src/xdocs/checks/naming/packagename.xml.template @@ -26,22 +26,10 @@
                              - - - - - - - - - - - - - - - -
                              namedescriptiontypedefault valuesince
                              formatSpecifies valid identifiers.Pattern"^[a-z]+(\.[a-zA-Z_]\w*)*$"3.0
                              + + +
                              diff --git a/src/xdocs/checks/naming/parametername.xml b/src/xdocs/checks/naming/parametername.xml index c4de008525c..aed5a414fe4 100644 --- a/src/xdocs/checks/naming/parametername.xml +++ b/src/xdocs/checks/naming/parametername.xml @@ -41,26 +41,20 @@ accessModifiers Access modifiers of methods where parameters are checked. - - - AccessModifierOption[] - - + AccessModifierOption[] public, protected, package, private 7.5 format - Specifies valid identifiers. + Sets the pattern to match valid identifiers. Pattern "^[a-z][a-zA-Z0-9]*$" 3.0 ignoreOverridden - - Allows to skip methods with Override annotation from validation. - + Allows to skip methods with Override annotation from validation. boolean false 6.12.1 diff --git a/src/xdocs/checks/naming/parametername.xml.template b/src/xdocs/checks/naming/parametername.xml.template index 85d62326f8c..5b3a125fcc6 100644 --- a/src/xdocs/checks/naming/parametername.xml.template +++ b/src/xdocs/checks/naming/parametername.xml.template @@ -30,42 +30,10 @@
                              - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                              namedescriptiontypedefault valuesince
                              accessModifiersAccess modifiers of methods where parameters are checked. - - AccessModifierOption[] - - public, protected, package, private7.5
                              formatSpecifies valid identifiers.Pattern"^[a-z][a-zA-Z0-9]*$"3.0
                              ignoreOverridden - Allows to skip methods with Override annotation from validation. - booleanfalse6.12.1
                              + + +
                              diff --git a/src/xdocs/checks/naming/patternvariablename.xml b/src/xdocs/checks/naming/patternvariablename.xml index 9702de572a3..fb39ecafca6 100644 --- a/src/xdocs/checks/naming/patternvariablename.xml +++ b/src/xdocs/checks/naming/patternvariablename.xml @@ -26,7 +26,7 @@ format - Specifies valid identifiers. + Sets the pattern to match valid identifiers. Pattern "^[a-z][a-zA-Z0-9]*$" 8.36 diff --git a/src/xdocs/checks/naming/patternvariablename.xml.template b/src/xdocs/checks/naming/patternvariablename.xml.template index 337dc11f830..237d763414d 100644 --- a/src/xdocs/checks/naming/patternvariablename.xml.template +++ b/src/xdocs/checks/naming/patternvariablename.xml.template @@ -16,22 +16,10 @@
                              - - - - - - - - - - - - - - - -
                              namedescriptiontypedefault valuesince
                              formatSpecifies valid identifiers.Pattern"^[a-z][a-zA-Z0-9]*$"8.36
                              + + +
                              diff --git a/src/xdocs/checks/naming/recordcomponentname.xml b/src/xdocs/checks/naming/recordcomponentname.xml index 1535fa0c25d..43349c9a77f 100644 --- a/src/xdocs/checks/naming/recordcomponentname.xml +++ b/src/xdocs/checks/naming/recordcomponentname.xml @@ -24,13 +24,9 @@ format - Specifies valid identifiers. - - Pattern - - - "^[a-z][a-zA-Z0-9]*$" - + Sets the pattern to match valid identifiers. + Pattern + "^[a-z][a-zA-Z0-9]*$" 8.40 diff --git a/src/xdocs/checks/naming/recordcomponentname.xml.template b/src/xdocs/checks/naming/recordcomponentname.xml.template index fad4b751a40..7316dc5445e 100644 --- a/src/xdocs/checks/naming/recordcomponentname.xml.template +++ b/src/xdocs/checks/naming/recordcomponentname.xml.template @@ -14,26 +14,10 @@
                              - - - - - - - - - - - - - - - -
                              namedescriptiontypedefault valuesince
                              formatSpecifies valid identifiers. - Pattern - - "^[a-z][a-zA-Z0-9]*$" - 8.40
                              + + +
                              diff --git a/src/xdocs/checks/naming/recordtypeparametername.xml b/src/xdocs/checks/naming/recordtypeparametername.xml index 8c0a7cf268c..560864bcbe8 100644 --- a/src/xdocs/checks/naming/recordtypeparametername.xml +++ b/src/xdocs/checks/naming/recordtypeparametername.xml @@ -24,13 +24,9 @@ format - Specifies valid identifiers. - - Pattern - - - "^[A-Z]$" - + Sets the pattern to match valid identifiers. + Pattern + "^[A-Z]$" 8.36 diff --git a/src/xdocs/checks/naming/recordtypeparametername.xml.template b/src/xdocs/checks/naming/recordtypeparametername.xml.template index 94cf71c47ac..c672530325f 100644 --- a/src/xdocs/checks/naming/recordtypeparametername.xml.template +++ b/src/xdocs/checks/naming/recordtypeparametername.xml.template @@ -14,26 +14,10 @@
                              - - - - - - - - - - - - - - - -
                              namedescriptiontypedefault valuesince
                              formatSpecifies valid identifiers. - Pattern - - "^[A-Z]$" - 8.36
                              + + +
                              diff --git a/src/xdocs/checks/naming/staticvariablename.xml b/src/xdocs/checks/naming/staticvariablename.xml index 464683969e1..7baa51d86c0 100644 --- a/src/xdocs/checks/naming/staticvariablename.xml +++ b/src/xdocs/checks/naming/staticvariablename.xml @@ -27,28 +27,28 @@ applyToPackage - Control whether we should apply the check to package-private members. + Control if check should apply to package-private members. boolean true 5.0 applyToPrivate - Control whether we should apply the check to private members. + Control if check should apply to private members. boolean true 5.0 applyToProtected - Control whether we should apply the check to protected members. + Control if check should apply to protected members. boolean true 5.0 applyToPublic - Control whether we should apply the check to public members. + Control if check should apply to public members. boolean true 5.0 diff --git a/src/xdocs/checks/naming/typename.xml b/src/xdocs/checks/naming/typename.xml index 7b56c4d90cb..c70b8a4dc34 100644 --- a/src/xdocs/checks/naming/typename.xml +++ b/src/xdocs/checks/naming/typename.xml @@ -26,28 +26,28 @@ applyToPackage - Control whether we should apply the check to package-private members. + Control if check should apply to package-private members. boolean true 5.0 applyToPrivate - Control whether we should apply the check to private members. + Control if check should apply to private members. boolean true 5.0 applyToProtected - Control whether we should apply the check to protected members. + Control if check should apply to protected members. boolean true 5.0 applyToPublic - Control whether we should apply the check to public members. + Control if check should apply to public members. boolean true 5.0