diff --git a/config/checkstyle-non-main-files-suppressions.xml b/config/checkstyle-non-main-files-suppressions.xml index 360d67958c5..38643aa887a 100644 --- a/config/checkstyle-non-main-files-suppressions.xml +++ b/config/checkstyle-non-main-files-suppressions.xml @@ -253,18 +253,6 @@ - - - - - - Known limitation: The key should not contain a newline. * The string compare will work, but not the line number reporting.

*
  • - * Property {@code fileExtensions} - Specify file type extension of the files to check. + * Property {@code fileExtensions} - Specify the file extensions of the files to process. * Type is {@code java.lang.String[]}. * Default value is {@code .properties}. *
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java index 66a037819df..83412fbf78f 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java @@ -93,6 +93,11 @@ * of default translation files in project. *

*

+ * Note: If your project uses preprocessed translation files and the original files do not have the + * {@code properties} extension, you can specify additional file extensions + * via the {@code fileExtensions} property. + *

+ *

* Attention: the check will perform the validation of ISO codes if the option * is used. So, if you specify, for example, "mm" for language code, * TranslationCheck will rise violation that the language code is incorrect. @@ -113,10 +118,7 @@ * Default value is {@code "^messages.*$"}. * *

  • - * Property {@code fileExtensions} - Specify file type extension to identify - * translation files. Setting this property is typically only required if your - * translation files are preprocessed and the original files do not have - * the extension {@code .properties} + * Property {@code fileExtensions} - Specify the file extensions of the files to process. * Type is {@code java.lang.String[]}. * Default value is {@code .properties}. *
  • diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/UniquePropertiesCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/UniquePropertiesCheck.java index 445bf9b062f..ef4e792c308 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/UniquePropertiesCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/UniquePropertiesCheck.java @@ -46,7 +46,7 @@ *

    *
      *
    • - * Property {@code fileExtensions} - Specify file type extension of the files to check. + * Property {@code fileExtensions} - Specify the file extensions of the files to process. * Type is {@code java.lang.String[]}. * Default value is {@code .properties}. *
    • 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 29666685800..03819d78b33 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/site/SiteUtil.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/site/SiteUtil.java @@ -250,6 +250,9 @@ public final class SiteUtil { Map.entry("FileTabCharacterCheck.fileExtensions", VERSION_5_0), Map.entry("NewlineAtEndOfFileCheck.fileExtensions", "3.1"), Map.entry("JavadocPackageCheck.fileExtensions", VERSION_5_0), + Map.entry("OrderedPropertiesCheck.fileExtensions", "8.22"), + Map.entry("UniquePropertiesCheck.fileExtensions", VERSION_5_7), + Map.entry("TranslationCheck.fileExtensions", VERSION_3_0), Map.entry("LineLengthCheck.fileExtensions", V824), // until https://github.com/checkstyle/checkstyle/issues/14052 Map.entry("JavadocBlockTagLocationCheck.violateExecutionOnNonTightHtml", V824), diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/OrderedPropertiesCheck.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/OrderedPropertiesCheck.xml index 4b147cd8917..cbf10ac2bf7 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/OrderedPropertiesCheck.xml +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/OrderedPropertiesCheck.xml @@ -24,7 +24,7 @@ - Specify file type extension of the files to check. + Specify the file extensions of the files to process. diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/TranslationCheck.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/TranslationCheck.xml index 60be31467ce..65f883404e0 100644 --- a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/TranslationCheck.xml +++ b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/TranslationCheck.xml @@ -44,6 +44,11 @@ of default translation files in project. </p> <p> + Note: If your project uses preprocessed translation files and the original files do not have the + {@code properties} extension, you can specify additional file extensions + via the {@code fileExtensions} property. + </p> + <p> Attention: the check will perform the validation of ISO codes if the option is used. So, if you specify, for example, "mm" for language code, TranslationCheck will rise violation that the language code is incorrect. @@ -66,10 +71,7 @@ - Specify file type extension to identify - translation files. Setting this property is typically only required if your - translation files are preprocessed and the original files do not have - the extension {@code .properties} + Specify the file extensions of the files to process. - Specify file type extension of the files to check. + Specify the file extensions of the files to process. diff --git a/src/xdocs/checks/misc/orderedproperties.xml b/src/xdocs/checks/misc/orderedproperties.xml index 3b3d9df5a38..b512870926a 100644 --- a/src/xdocs/checks/misc/orderedproperties.xml +++ b/src/xdocs/checks/misc/orderedproperties.xml @@ -43,7 +43,7 @@ fileExtensions - Specify file type extension of the files to check. + Specify the file extensions of the files to process. String[] .properties 8.22 diff --git a/src/xdocs/checks/misc/orderedproperties.xml.template b/src/xdocs/checks/misc/orderedproperties.xml.template index 342b0e0d86b..4a2eb39eed2 100644 --- a/src/xdocs/checks/misc/orderedproperties.xml.template +++ b/src/xdocs/checks/misc/orderedproperties.xml.template @@ -33,22 +33,10 @@
      - - - - - - - - - - - - - - - -
      namedescriptiontypedefault valuesince
      fileExtensionsSpecify file type extension of the files to check.String[].properties8.22
      + + +
      diff --git a/src/xdocs/checks/misc/todocomment.xml.template b/src/xdocs/checks/misc/todocomment.xml.template index e64537d2905..ba3c4156740 100644 --- a/src/xdocs/checks/misc/todocomment.xml.template +++ b/src/xdocs/checks/misc/todocomment.xml.template @@ -20,22 +20,10 @@
      - - - - - - - - - - - - - - - -
      namedescriptiontypedefault valuesince
      formatSpecify pattern to match comments against.Pattern"TODO:"3.0
      + + +
      diff --git a/src/xdocs/checks/misc/trailingcomment.xml b/src/xdocs/checks/misc/trailingcomment.xml index f58792c9836..b1c866b6c3e 100644 --- a/src/xdocs/checks/misc/trailingcomment.xml +++ b/src/xdocs/checks/misc/trailingcomment.xml @@ -90,8 +90,7 @@ d = e / f; // Another comment for this line legalComment - Define pattern for text allowed in trailing comments. This - pattern will not be applied to multiline comments. + Define pattern for text allowed in trailing comments. This pattern will not be applied to multiline comments. Pattern null 4.2 diff --git a/src/xdocs/checks/misc/trailingcomment.xml.template b/src/xdocs/checks/misc/trailingcomment.xml.template index 707abea0f52..4172271882e 100644 --- a/src/xdocs/checks/misc/trailingcomment.xml.template +++ b/src/xdocs/checks/misc/trailingcomment.xml.template @@ -73,30 +73,10 @@ d = e / f; // Another comment for this line
      - - - - - - - - - - - - - - - - - - - - - - -
      namedescriptiontypedefault valuesince
      formatSpecify pattern for strings allowed before the comment.Pattern"^[\s});]*$"3.4
      legalCommentDefine pattern for text allowed in trailing comments. This - pattern will not be applied to multiline comments.Patternnull4.2
      + + +
      diff --git a/src/xdocs/checks/misc/translation.xml b/src/xdocs/checks/misc/translation.xml index 46b6d50b6c0..289f0157313 100644 --- a/src/xdocs/checks/misc/translation.xml +++ b/src/xdocs/checks/misc/translation.xml @@ -54,6 +54,12 @@ messages.properties: Key 'ok' missing. one language code) of required translations the check will also check for existence of default translation files in project.

      +

      + Note: If your project uses preprocessed translation files and the original files + do not have the properties extension, + you can specify additional file extensions + via the fileExtensions property. +

      Attention: the check will perform the validation of ISO codes if the option is used. So, if you specify, for example, "mm" for language code, TranslationCheck @@ -79,32 +85,22 @@ messages.properties: Key 'ok' missing. baseName - Specify - - Base name of resource bundles which contain message resources. It helps - the check to distinguish config and localization resources. - + Specify + Base name of resource bundles which contain message resources. It helps the check to distinguish config and localization resources. Pattern "^messages.*$" 6.17 fileExtensions - - Specify file type extension to identify translation files. Setting - this property is typically only required if your - translation files are preprocessed and the original files - do not have the extension .properties - + Specify the file extensions of the files to process. String[] .properties 3.0 requiredTranslations - - Specify language codes of required translations which must exist in project. - + Specify language codes of required translations which must exist in project. String[] {} 6.11 diff --git a/src/xdocs/checks/misc/translation.xml.template b/src/xdocs/checks/misc/translation.xml.template index dd3b5678e4a..bbfff6d0ab3 100644 --- a/src/xdocs/checks/misc/translation.xml.template +++ b/src/xdocs/checks/misc/translation.xml.template @@ -54,6 +54,12 @@ messages.properties: Key 'ok' missing. one language code) of required translations the check will also check for existence of default translation files in project.

      +

      + Note: If your project uses preprocessed translation files and the original files + do not have the properties extension, + you can specify additional file extensions + via the fileExtensions property. +

      Attention: the check will perform the validation of ISO codes if the option is used. So, if you specify, for example, "mm" for language code, TranslationCheck @@ -69,47 +75,10 @@ messages.properties: Key 'ok' missing.

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      namedescriptiontypedefault valuesince
      baseNameSpecify - - Base name of resource bundles which contain message resources. It helps - the check to distinguish config and localization resources. - Pattern"^messages.*$"6.17
      fileExtensions - Specify file type extension to identify translation files. Setting - this property is typically only required if your - translation files are preprocessed and the original files - do not have the extension .properties - String[].properties3.0
      requiredTranslations - Specify language codes of required translations which must exist in project. - String[]{}6.11
      + + +
      diff --git a/src/xdocs/checks/misc/uncommentedmain.xml b/src/xdocs/checks/misc/uncommentedmain.xml index 0fb42c998cf..a94d52c1adb 100644 --- a/src/xdocs/checks/misc/uncommentedmain.xml +++ b/src/xdocs/checks/misc/uncommentedmain.xml @@ -35,8 +35,7 @@ excludedClasses - Specify pattern for qualified names of classes which are allowed - to have a main method. + Specify pattern for qualified names of classes which are allowed to have a main method. Pattern "^$" 3.2 diff --git a/src/xdocs/checks/misc/uncommentedmain.xml.template b/src/xdocs/checks/misc/uncommentedmain.xml.template index 2386902cf9d..83301ec3a48 100644 --- a/src/xdocs/checks/misc/uncommentedmain.xml.template +++ b/src/xdocs/checks/misc/uncommentedmain.xml.template @@ -25,23 +25,10 @@
      - - - - - - - - - - - - - - - -
      namedescriptiontypedefault valuesince
      excludedClassesSpecify pattern for qualified names of classes which are allowed - to have a main method.Pattern"^$"3.2
      + + +
      diff --git a/src/xdocs/checks/misc/uniqueproperties.xml b/src/xdocs/checks/misc/uniqueproperties.xml index 7884482daf9..8dfab2e6844 100644 --- a/src/xdocs/checks/misc/uniqueproperties.xml +++ b/src/xdocs/checks/misc/uniqueproperties.xml @@ -33,7 +33,7 @@ fileExtensions - Specify file type extension of the files to check. + Specify the file extensions of the files to process. String[] .properties 5.7 diff --git a/src/xdocs/checks/misc/uniqueproperties.xml.template b/src/xdocs/checks/misc/uniqueproperties.xml.template index 17e1bf5e22d..8384c7ee80a 100644 --- a/src/xdocs/checks/misc/uniqueproperties.xml.template +++ b/src/xdocs/checks/misc/uniqueproperties.xml.template @@ -23,22 +23,10 @@
      - - - - - - - - - - - - - - - -
      namedescriptiontypedefault valuesince
      fileExtensionsSpecify file type extension of the files to check.String[].properties5.7
      + + +