Repository: checkstyle/checkstyle

Problem statement:
BDD configuration comments should be in XML
Consider:

```bash
~/I/checkstyle/s/t/resources/c/p/t/c/checks/im/importorder master *1 !2 > cat InputImportOrderStaticGroupOrderBottom_Negative2.java
/*
ImportOrder
option = top
groups = org, java
ordered = (default)true
separated = true
separatedStaticGroups = (default)false
caseSensitive = (default)true
staticGroups = (default)
sortStaticImportsAlphabetically = true
useContainerOrderingForStatic = (default)false
tokens = (default)STATIC_IMPORT


*/

package com.puppycrawl.tools.checkstyle.checks.imports.importorder;

import org.antlr.v4.runtime.*; // ok

import static java.lang.Math.PI; // violation
import static org.antlr.v4.runtime.Recognizer.EOF; // ok

import java.util.Set; // ok

public class InputImportOrderStaticGroupOrderBottom_Negative2
{

}

```

If I want to test or use this config locally or set up an example for an issue report, I need to manually translate this into a configuration module:

```
~/IdeaProjects/checkstyle_tester/src > cat import_config.xml
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
        "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
        "https://checkstyle.org/dtds/configuration_1_3.dtd">

<module name="Checker">
    <property name="charset" value="UTF-8"/>

    <module name="TreeWalker">
        <module name="ImportOrder">
          <property name="option" value="top"/>
          <property name="groups" value="org, java"/>
          <property name="ordered" value="true"/>
          <property name="separated" value="true"/>
          <property name="separatedStaticGroups" value="false"/>
          <property name="caseSensitive" value="true"/>
          <property name="staticGroups" value=""/>
          <property name="sortStaticImportsAlphabetically" value="true"/>
          <property name="useContainerOrderingForStatic" value="false"/>
          <property name="tokens" value="STATIC_IMPORT"/>
        </module>
    </module>
</module>


```

I am proposing that we migrate from our custom config/ config parser, to simply extract xml from block comment in header to create check module configs.

Example:
```
~/I/checkstyle/s/t/resources/c/p/t/c/checks/im/importorder master *1 !2 > cat InputImportOrderStaticGroupOrderBottom_Negative2.java
/*
<module name="Checker">
    <property name="charset" value="UTF-8"/>

    <module name="TreeWalker">
        <module name="ImportOrder">
          <property name="option" value="top"/>
          <property name="groups" value="org, java"/>
          <property name="ordered" value="true"/>
          <property name="separated" value="true"/>
          <property name="separatedStaticGroups" value="false"/>
          <property name="caseSensitive" value="true"/>
          <property name="staticGroups" value=""/>
          <property name="sortStaticImportsAlphabetically" value="true"/>
          <property name="useContainerOrderingForStatic" value="false"/>
          <property name="tokens" value="STATIC_IMPORT"/>
        </module>
    </module>
</module>
*/

package com.puppycrawl.tools.checkstyle.checks.imports.importorder;

import org.antlr.v4.runtime.*; // ok

import static java.lang.Math.PI; // violation
import static org.antlr.v4.runtime.Recognizer.EOF; // ok

import java.util.Set; // ok

public class InputImportOrderStaticGroupOrderBottom_Negative2
{

}

```

Using xml for our configuration header has several advantages:
1. Allows us to validate syntax/ format of configuration easily
2. Will ease issues where we need multiple modules, etc.
3. Can even allow comments inline to explain complicated module combinations in place
4. Provides portability; the same config used in a given test can be used in an actual configuration file, issue report, etc.
5. Allows us to remove all current limitations of BDD.


Hints:
>Allows us to validate syntax/ format of configuration easily

We already payed a price for this, it is not an issue now.

>Will ease issues where we need multiple modules

We do not want to have complicated configs, issue with filters (where we need few modules) looks like resolved.

>Can even allow comments inline to explain complicated module combinations in place

I might be wrong, but , content of comment is property file, so it should support `#`

>Allows us to remove all current limitations of BDD.

Probably good time to list them all.

>same config used in a given test can be used in an actual configuration file

Please share more on this, in what cases you need this.

----------

We had idea of xml at the beginning, but abandoned it due to high technical verbosity. 
Issues with length of lines.
Reviewer should look at config content easily.
We can try this as extra option.
We can have comment in 
```
/*xml
<module name="Checker">
 ....
*/
```

To let parser do load by xml.
So there will be no conflicts, and it might find its place in life.

https://checkstyle.org/writingjavadocchecks.html#What_is_Javadoc_comment last paragraphs on this section.
> We can try this as extra option.

The idea looks good at first sight. I think if we go with this, the parser for the examples will be the testing ground before migrating all tests? Or is the idea to make and use this only for the examples parser?
Hopefully it is testing ground :)
We will not migrate all tests.
All we can do is to use it in ExampleX.java.
@romani @nrmancuso @rnveach Do you have any tips on how this is going to work?

I am digging right now. I  imagine a new method `verifyWithXmlConfigParser()` that passes file to `XmlConfigParser`(new class in `bdd` package) which will extract config from comment starting with `/*xml` and finishing with `*/`. Then `verifyWithXmlConfigParser()` passes that configuration string to `ConfigurationLoader.loadConfiguration()`.

This is what I imagine after just looking around. I could be completely wrong.
I thought in this as update of existing verify method with internal switch/if to load content as xml instead of as properties. 
We just need to have ready to use config object to execute. How this config was loaded is business on very specific phase in this verify method.

In worse case I ok with verifyWithXmlConfigParser()
Test methods should not have to care about which verify method to use.  Either try and fail to parse one type and the try other, or use special comment format like ‘/*xml’
Better to use some marker in comment to be explicit.

Patch:
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java b/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java
--- a/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java
@@ -68,6 +68,14 @@ public enum IgnoredModulesOptions {
 
     }
 
+    /** The new public ID for version 1_3 of the configuration dtd. */
+    public static final String DTD_PUBLIC_CS_ID_1_3 =
+        "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN";
+
+    /** The resource for version 1_3 of the configuration dtd. */
+    public static final String DTD_CONFIGURATION_NAME_1_3 =
+        "com/puppycrawl/tools/checkstyle/configuration_1_3.dtd";
+
     /** Format of message for sax parse exception. */
     private static final String SAX_PARSE_EXCEPTION_FORMAT = "%s - %s:%s:%s";
 
@@ -111,14 +119,6 @@ public enum IgnoredModulesOptions {
     private static final String DTD_PUBLIC_ID_1_3 =
         "-//Puppy Crawl//DTD Check Configuration 1.3//EN";
 
-    /** The new public ID for version 1_3 of the configuration dtd. */
-    private static final String DTD_PUBLIC_CS_ID_1_3 =
-        "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN";
-
-    /** The resource for version 1_3 of the configuration dtd. */
-    private static final String DTD_CONFIGURATION_NAME_1_3 =
-        "com/puppycrawl/tools/checkstyle/configuration_1_3.dtd";
-
     /** Prefix for the exception when unable to parse resource. */
     private static final String UNABLE_TO_PARSE_EXCEPTION_PREFIX = "unable to parse"
             + " configuration stream";
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameExamplesTest.java
@@ -42,9 +42,9 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "14:7: " + getCheckMessage(MSG_KEY, "CURRENT_COUNTER", DEFAULT_EXPECTED_CAPITAL_COUNT),
-            "23:8: " + getCheckMessage(MSG_KEY, "incrementCOUNTER", DEFAULT_EXPECTED_CAPITAL_COUNT),
-            "27:15: " + getCheckMessage(MSG_KEY, "incrementGLOBAL", DEFAULT_EXPECTED_CAPITAL_COUNT),
+            "18:7: " + getCheckMessage(MSG_KEY, "CURRENT_COUNTER", DEFAULT_EXPECTED_CAPITAL_COUNT),
+            "27:8: " + getCheckMessage(MSG_KEY, "incrementCOUNTER", DEFAULT_EXPECTED_CAPITAL_COUNT),
+            "31:15: " + getCheckMessage(MSG_KEY, "incrementGLOBAL", DEFAULT_EXPECTED_CAPITAL_COUNT),
         };
 
         verifyWithInlineConfigParser(getPath("Example1.java"), expected);
@@ -53,11 +53,11 @@ public void testExample1() throws Exception {
     @Test
     public void testExample2() throws Exception {
         final String[] expected = {
-            "16:7: " + getCheckMessage(MSG_KEY, "CURRENT_COUNTER", DEFAULT_EXPECTED_CAPITAL_COUNT),
-            "18:14: " + getCheckMessage(MSG_KEY, "GLOBAL_COUNTER", DEFAULT_EXPECTED_CAPITAL_COUNT),
-            "22:15: " + getCheckMessage(MSG_KEY, "printCOUNTER", DEFAULT_EXPECTED_CAPITAL_COUNT),
-            "26:8: " + getCheckMessage(MSG_KEY, "incrementCOUNTER", DEFAULT_EXPECTED_CAPITAL_COUNT),
-            "30:15: " + getCheckMessage(MSG_KEY, "incrementGLOBAL", DEFAULT_EXPECTED_CAPITAL_COUNT),
+            "21:7: " + getCheckMessage(MSG_KEY, "CURRENT_COUNTER", DEFAULT_EXPECTED_CAPITAL_COUNT),
+            "23:14: " + getCheckMessage(MSG_KEY, "GLOBAL_COUNTER", DEFAULT_EXPECTED_CAPITAL_COUNT),
+            "27:15: " + getCheckMessage(MSG_KEY, "printCOUNTER", DEFAULT_EXPECTED_CAPITAL_COUNT),
+            "31:8: " + getCheckMessage(MSG_KEY, "incrementCOUNTER", DEFAULT_EXPECTED_CAPITAL_COUNT),
+            "35:15: " + getCheckMessage(MSG_KEY, "incrementGLOBAL", DEFAULT_EXPECTED_CAPITAL_COUNT),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
@@ -68,8 +68,8 @@ public void testExample3() throws Exception {
         final int expectedCapitalCount = 1;
 
         final String[] expected = {
-            "16:7: " + getCheckMessage(MSG_KEY, "secondNUM", expectedCapitalCount),
-            "18:14: " + getCheckMessage(MSG_KEY, "fourthNUm", expectedCapitalCount),
+            "21:7: " + getCheckMessage(MSG_KEY, "secondNUM", expectedCapitalCount),
+            "23:14: " + getCheckMessage(MSG_KEY, "fourthNUm", expectedCapitalCount),
         };
 
         verifyWithInlineConfigParser(getPath("Example3.java"), expected);
@@ -80,9 +80,9 @@ public void testExample4() throws Exception {
         final int expectedCapitalCount = 2;
 
         final String[] expected = {
-            "17:7: " + getCheckMessage(MSG_KEY, "secondMYNum", expectedCapitalCount),
-            "18:7: " + getCheckMessage(MSG_KEY, "thirdNUM", expectedCapitalCount),
-            "21:10: " + getCheckMessage(MSG_KEY, "firstXML", expectedCapitalCount),
+            "22:7: " + getCheckMessage(MSG_KEY, "secondMYNum", expectedCapitalCount),
+            "23:7: " + getCheckMessage(MSG_KEY, "thirdNUM", expectedCapitalCount),
+            "26:10: " + getCheckMessage(MSG_KEY, "firstXML", expectedCapitalCount),
         };
 
         verifyWithInlineConfigParser(getPath("Example4.java"), expected);
@@ -93,9 +93,9 @@ public void testExample5() throws Exception {
         final int expectedCapitalCount = 1;
 
         final String[] expected = {
-            "16:7: " + getCheckMessage(MSG_KEY, "counterXYZ", expectedCapitalCount),
-            "18:13: " + getCheckMessage(MSG_KEY, "customerID", expectedCapitalCount),
-            "19:14: " + getCheckMessage(MSG_KEY, "nextID", expectedCapitalCount),
+            "21:7: " + getCheckMessage(MSG_KEY, "counterXYZ", expectedCapitalCount),
+            "23:13: " + getCheckMessage(MSG_KEY, "customerID", expectedCapitalCount),
+            "24:14: " + getCheckMessage(MSG_KEY, "nextID", expectedCapitalCount),
         };
 
         verifyWithInlineConfigParser(getPath("Example5.java"), expected);
@@ -106,9 +106,9 @@ public void testExample6() throws Exception {
         final int expectedCapitalCount = 1;
 
         final String[] expected = {
-            "16:7: " + getCheckMessage(MSG_KEY, "counterXYZ", expectedCapitalCount),
-            "18:13: " + getCheckMessage(MSG_KEY, "customerID", expectedCapitalCount),
-            "21:20: " + getCheckMessage(MSG_KEY, "MAX_ALLOWED", expectedCapitalCount),
+            "21:7: " + getCheckMessage(MSG_KEY, "counterXYZ", expectedCapitalCount),
+            "23:13: " + getCheckMessage(MSG_KEY, "customerID", expectedCapitalCount),
+            "26:20: " + getCheckMessage(MSG_KEY, "MAX_ALLOWED", expectedCapitalCount),
         };
 
         verifyWithInlineConfigParser(getPath("Example6.java"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheckExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheckExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheckExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheckExamplesTest.java
@@ -42,10 +42,10 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "12:3: " + getCheckMessage(MSG_ILLEGAL_ABSTRACT_CLASS_NAME, "Second", DEFAULT_PATTERN),
-            "13:3: " + getCheckMessage(MSG_NO_ABSTRACT_CLASS_MODIFIER, "AbstractThird",
+            "16:3: " + getCheckMessage(MSG_ILLEGAL_ABSTRACT_CLASS_NAME, "Second", DEFAULT_PATTERN),
+            "17:3: " + getCheckMessage(MSG_NO_ABSTRACT_CLASS_MODIFIER, "AbstractThird",
                 DEFAULT_PATTERN),
-            "15:3: " + getCheckMessage(MSG_ILLEGAL_ABSTRACT_CLASS_NAME, "GeneratorFifth",
+            "19:3: " + getCheckMessage(MSG_ILLEGAL_ABSTRACT_CLASS_NAME, "GeneratorFifth",
                     DEFAULT_PATTERN),
         };
 
@@ -55,8 +55,8 @@ public void testExample1() throws Exception {
     @Test
     public void testExample2() throws Exception {
         final String[] expected = {
-            "13:3: " + getCheckMessage(MSG_ILLEGAL_ABSTRACT_CLASS_NAME, "Second", DEFAULT_PATTERN),
-            "16:3: " + getCheckMessage(MSG_ILLEGAL_ABSTRACT_CLASS_NAME, "GeneratorFifth",
+            "18:3: " + getCheckMessage(MSG_ILLEGAL_ABSTRACT_CLASS_NAME, "Second", DEFAULT_PATTERN),
+            "21:3: " + getCheckMessage(MSG_ILLEGAL_ABSTRACT_CLASS_NAME, "GeneratorFifth",
                     DEFAULT_PATTERN),
         };
 
@@ -66,7 +66,7 @@ public void testExample2() throws Exception {
     @Test
     public void testExample3() throws Exception {
         final String[] expected = {
-            "14:3: " + getCheckMessage(MSG_NO_ABSTRACT_CLASS_MODIFIER, "AbstractThird",
+            "19:3: " + getCheckMessage(MSG_NO_ABSTRACT_CLASS_MODIFIER, "AbstractThird",
                 DEFAULT_PATTERN),
         };
 
@@ -78,9 +78,9 @@ public void testExample4() throws Exception {
         final String pattern = "^Generator.+$";
 
         final String[] expected = {
-            "13:3: " + getCheckMessage(MSG_ILLEGAL_ABSTRACT_CLASS_NAME, "AbstractFirst", pattern),
-            "14:3: " + getCheckMessage(MSG_ILLEGAL_ABSTRACT_CLASS_NAME, "Second", pattern),
-            "18:3: " + getCheckMessage(MSG_NO_ABSTRACT_CLASS_MODIFIER, "GeneratorSixth",
+            "18:3: " + getCheckMessage(MSG_ILLEGAL_ABSTRACT_CLASS_NAME, "AbstractFirst", pattern),
+            "19:3: " + getCheckMessage(MSG_ILLEGAL_ABSTRACT_CLASS_NAME, "Second", pattern),
+            "23:3: " + getCheckMessage(MSG_NO_ABSTRACT_CLASS_MODIFIER, "GeneratorSixth",
                 pattern),
         };
 
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/naming/ConstantNameCheckExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/naming/ConstantNameCheckExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/naming/ConstantNameCheckExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/naming/ConstantNameCheckExamplesTest.java
@@ -41,12 +41,12 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "13:20: " + getCheckMessage(MSG_INVALID_PATTERN, "third_Constant3", DEFAULT_PATTERN),
-            "14:28: " + getCheckMessage(MSG_INVALID_PATTERN, "fourth_Const4", DEFAULT_PATTERN),
-            "15:27: " + getCheckMessage(MSG_INVALID_PATTERN, "log", DEFAULT_PATTERN),
-            "16:30: " + getCheckMessage(MSG_INVALID_PATTERN, "logger", DEFAULT_PATTERN),
-            "17:20: " + getCheckMessage(MSG_INVALID_PATTERN, "loggerMYSELF", DEFAULT_PATTERN),
-            "19:30: " + getCheckMessage(MSG_INVALID_PATTERN, "myselfConstant", DEFAULT_PATTERN),
+            "17:20: " + getCheckMessage(MSG_INVALID_PATTERN, "third_Constant3", DEFAULT_PATTERN),
+            "18:28: " + getCheckMessage(MSG_INVALID_PATTERN, "fourth_Const4", DEFAULT_PATTERN),
+            "19:27: " + getCheckMessage(MSG_INVALID_PATTERN, "log", DEFAULT_PATTERN),
+            "20:30: " + getCheckMessage(MSG_INVALID_PATTERN, "logger", DEFAULT_PATTERN),
+            "21:20: " + getCheckMessage(MSG_INVALID_PATTERN, "loggerMYSELF", DEFAULT_PATTERN),
+            "23:30: " + getCheckMessage(MSG_INVALID_PATTERN, "myselfConstant", DEFAULT_PATTERN),
         };
 
         verifyWithInlineConfigParser(getPath("Example1.java"), expected);
@@ -57,10 +57,10 @@ public void testExample2() throws Exception {
         final String pattern = "^log(ger)?$|^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$";
 
         final String[] expected = {
-            "14:20: " + getCheckMessage(MSG_INVALID_PATTERN, "third_Constant3", pattern),
-            "15:28: " + getCheckMessage(MSG_INVALID_PATTERN, "fourth_Const4", pattern),
-            "18:20: " + getCheckMessage(MSG_INVALID_PATTERN, "loggerMYSELF", pattern),
-            "20:30: " + getCheckMessage(MSG_INVALID_PATTERN, "myselfConstant", pattern),
+            "19:20: " + getCheckMessage(MSG_INVALID_PATTERN, "third_Constant3", pattern),
+            "20:28: " + getCheckMessage(MSG_INVALID_PATTERN, "fourth_Const4", pattern),
+            "23:20: " + getCheckMessage(MSG_INVALID_PATTERN, "loggerMYSELF", pattern),
+            "25:30: " + getCheckMessage(MSG_INVALID_PATTERN, "myselfConstant", pattern),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
@@ -69,9 +69,9 @@ public void testExample2() throws Exception {
     @Test
     public void testExample3() throws Exception {
         final String[] expected = {
-            "15:20: " + getCheckMessage(MSG_INVALID_PATTERN, "third_Constant3", DEFAULT_PATTERN),
-            "16:28: " + getCheckMessage(MSG_INVALID_PATTERN, "fourth_Const4", DEFAULT_PATTERN),
-            "19:20: " + getCheckMessage(MSG_INVALID_PATTERN, "loggerMYSELF", DEFAULT_PATTERN),
+            "20:20: " + getCheckMessage(MSG_INVALID_PATTERN, "third_Constant3", DEFAULT_PATTERN),
+            "21:28: " + getCheckMessage(MSG_INVALID_PATTERN, "fourth_Const4", DEFAULT_PATTERN),
+            "24:20: " + getCheckMessage(MSG_INVALID_PATTERN, "loggerMYSELF", DEFAULT_PATTERN),
         };
 
         verifyWithInlineConfigParser(getPath("Example3.java"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/sizes/LambdaBodyLengthExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/sizes/LambdaBodyLengthExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/sizes/LambdaBodyLengthExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/sizes/LambdaBodyLengthExamplesTest.java
@@ -41,8 +41,8 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "21:20: " + getCheckMessage(MSG_KEY, 11, DEFAULT_MAX),
-            "32:20: " + getCheckMessage(MSG_KEY, 11, DEFAULT_MAX),
+            "25:20: " + getCheckMessage(MSG_KEY, 11, DEFAULT_MAX),
+            "36:20: " + getCheckMessage(MSG_KEY, 11, DEFAULT_MAX),
         };
 
         verifyWithInlineConfigParser(getPath("Example1.java"), expected);
@@ -53,8 +53,8 @@ public void testExample2() throws Exception {
         final int max = 5;
 
         final String[] expected = {
-            "17:20: " + getCheckMessage(MSG_KEY, 6, max),
-            "24:20: " + getCheckMessage(MSG_KEY, 6, max),
+            "22:20: " + getCheckMessage(MSG_KEY, 6, max),
+            "29:20: " + getCheckMessage(MSG_KEY, 6, max),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForInitializerPadExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForInitializerPadExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForInitializerPadExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForInitializerPadExamplesTest.java
@@ -40,8 +40,8 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "13:11: " + getCheckMessage(MSG_PRECEDED, ";"),
-            "16:11: " + getCheckMessage(MSG_PRECEDED, ";"),
+            "17:11: " + getCheckMessage(MSG_PRECEDED, ";"),
+            "20:11: " + getCheckMessage(MSG_PRECEDED, ";"),
         };
 
         verifyWithInlineConfigParser(getPath("Example1.java"), expected);
@@ -50,8 +50,8 @@ public void testExample1() throws Exception {
     @Test
     public void testExample2() throws Exception {
         final String[] expected = {
-            "15:10: " + getCheckMessage(MSG_NOT_PRECEDED, ";"),
-            "16:10: " + getCheckMessage(MSG_NOT_PRECEDED, ";"),
+            "20:10: " + getCheckMessage(MSG_NOT_PRECEDED, ";"),
+            "21:10: " + getCheckMessage(MSG_NOT_PRECEDED, ";"),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForIteratorPadExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForIteratorPadExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForIteratorPadExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForIteratorPadExamplesTest.java
@@ -40,7 +40,7 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "18:66: " + getCheckMessage(MSG_WS_FOLLOWED, ";"),
+            "22:66: " + getCheckMessage(MSG_WS_FOLLOWED, ";"),
         };
 
         verifyWithInlineConfigParser(getPath("Example1.java"), expected);
@@ -49,7 +49,7 @@ public void testExample1() throws Exception {
     @Test
     public void testExample2() throws Exception {
         final String[] expected = {
-            "18:65: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, ";"),
+            "23:65: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, ";"),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyLineSeparatorExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyLineSeparatorExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyLineSeparatorExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyLineSeparatorExamplesTest.java
@@ -41,10 +41,10 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "10:1: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "package"),
-            "11:1: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "import"),
-            "18:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "VARIABLE_DEF"),
-            "25:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "METHOD_DEF"),
+            "14:1: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "package"),
+            "15:1: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "import"),
+            "22:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "VARIABLE_DEF"),
+            "29:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "METHOD_DEF"),
         };
 
         verifyWithInlineConfigParser(getPath("Example1.java"), expected);
@@ -53,8 +53,8 @@ public void testExample1() throws Exception {
     @Test
     public void testExample2() throws Exception {
         final String[] expected = {
-            "17:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "VARIABLE_DEF"),
-            "24:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "METHOD_DEF"),
+            "22:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "VARIABLE_DEF"),
+            "29:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "METHOD_DEF"),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
@@ -63,9 +63,9 @@ public void testExample2() throws Exception {
     @Test
     public void testExample3() throws Exception {
         final String[] expected = {
-            "11:1: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "package"),
-            "12:1: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "import"),
-            "26:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "METHOD_DEF"),
+            "16:1: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "package"),
+            "17:1: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "import"),
+            "31:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "METHOD_DEF"),
         };
 
         verifyWithInlineConfigParser(getPath("Example3.java"), expected);
@@ -74,12 +74,12 @@ public void testExample3() throws Exception {
     @Test
     public void testExample4() throws Exception {
         final String[] expected = {
-            "11:1: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "package"),
-            "12:1: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "import"),
-            "19:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "VARIABLE_DEF"),
-            "22:3: " + getCheckMessage(MSG_MULTIPLE_LINES, "VARIABLE_DEF"),
-            "25:3: " + getCheckMessage(MSG_MULTIPLE_LINES, "METHOD_DEF"),
-            "26:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "METHOD_DEF"),
+            "16:1: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "package"),
+            "17:1: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "import"),
+            "24:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "VARIABLE_DEF"),
+            "27:3: " + getCheckMessage(MSG_MULTIPLE_LINES, "VARIABLE_DEF"),
+            "30:3: " + getCheckMessage(MSG_MULTIPLE_LINES, "METHOD_DEF"),
+            "31:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "METHOD_DEF"),
         };
 
         verifyWithInlineConfigParser(getPath("Example4.java"), expected);
@@ -88,11 +88,11 @@ public void testExample4() throws Exception {
     @Test
     public void testExample5() throws Exception {
         final String[] expected = {
-            "11:1: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "package"),
-            "12:1: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "import"),
-            "19:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "VARIABLE_DEF"),
-            "26:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "METHOD_DEF"),
-            "27:17: " + getCheckMessage(MSG_MULTIPLE_LINES_INSIDE),
+            "16:1: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "package"),
+            "17:1: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "import"),
+            "24:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "VARIABLE_DEF"),
+            "31:3: " + getCheckMessage(MSG_SHOULD_BE_SEPARATED, "METHOD_DEF"),
+            "32:17: " + getCheckMessage(MSG_MULTIPLE_LINES_INSIDE),
         };
 
         verifyWithInlineConfigParser(getPath("Example5.java"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/FileTabCharacterExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/FileTabCharacterExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/FileTabCharacterExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/FileTabCharacterExamplesTest.java
@@ -41,7 +41,7 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "11:1: " + getCheckMessage(MSG_FILE_CONTAINS_TAB),
+            "13:1: " + getCheckMessage(MSG_FILE_CONTAINS_TAB),
         };
 
         verifyWithInlineConfigParser(getPath("Example1.java"), expected);
@@ -50,8 +50,8 @@ public void testExample1() throws Exception {
     @Test
     public void testExample2() throws Exception {
         final String[] expected = {
-            "12:1: " + getCheckMessage(MSG_CONTAINS_TAB),
-            "14:1: " + getCheckMessage(MSG_CONTAINS_TAB),
+            "15:1: " + getCheckMessage(MSG_CONTAINS_TAB),
+            "17:1: " + getCheckMessage(MSG_CONTAINS_TAB),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
@@ -60,7 +60,7 @@ public void testExample2() throws Exception {
     @Test
     public void testExample3() throws Exception {
         final String[] expected = {
-            "12:1: " + getCheckMessage(MSG_FILE_CONTAINS_TAB),
+            "15:1: " + getCheckMessage(MSG_FILE_CONTAINS_TAB),
         };
 
         verifyWithInlineConfigParser(getPath("Example3.java"), expected);
@@ -69,7 +69,7 @@ public void testExample3() throws Exception {
     @Test
     public void testExample4() throws Exception {
         final String[] expected = {
-            "10:1: " + getCheckMessage(MSG_FILE_CONTAINS_TAB),
+            "13:1: " + getCheckMessage(MSG_FILE_CONTAINS_TAB),
         };
 
         verifyWithInlineConfigParser(getPath("Example4.xml"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/MethodParamPadExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/MethodParamPadExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/MethodParamPadExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/MethodParamPadExamplesTest.java
@@ -41,9 +41,9 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "15:19: " + getCheckMessage(MSG_WS_PRECEDED, "("),
-            "16:11: " + getCheckMessage(MSG_WS_PRECEDED, "("),
-            "22:3: " + getCheckMessage(MSG_LINE_PREVIOUS, "("),
+            "19:19: " + getCheckMessage(MSG_WS_PRECEDED, "("),
+            "20:11: " + getCheckMessage(MSG_WS_PRECEDED, "("),
+            "26:3: " + getCheckMessage(MSG_LINE_PREVIOUS, "("),
         };
 
         verifyWithInlineConfigParser(getPath("Example1.java"), expected);
@@ -52,7 +52,7 @@ public void testExample1() throws Exception {
     @Test
     public void testExample2() throws Exception {
         final String[] expected = {
-            "22:21: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "("),
+            "27:21: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "("),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoLineWrapExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoLineWrapExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoLineWrapExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoLineWrapExamplesTest.java
@@ -39,9 +39,9 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "8:1: " + getCheckMessage(MSG_KEY, "package"),
-            "11:1: " + getCheckMessage(MSG_KEY, "import"),
-            "14:1: " + getCheckMessage(MSG_KEY, "import"),
+            "12:1: " + getCheckMessage(MSG_KEY, "package"),
+            "15:1: " + getCheckMessage(MSG_KEY, "import"),
+            "18:1: " + getCheckMessage(MSG_KEY, "import"),
         };
 
         verifyWithInlineConfigParser(getPath("Example1.java"), expected);
@@ -50,9 +50,9 @@ public void testExample1() throws Exception {
     @Test
     public void testExample2() throws Exception {
         final String[] expected = {
-            "8:1: " + getCheckMessage(MSG_KEY, "package"),
-            "12:1: " + getCheckMessage(MSG_KEY, "import"),
-            "15:1: " + getCheckMessage(MSG_KEY, "import"),
+            "12:1: " + getCheckMessage(MSG_KEY, "package"),
+            "16:1: " + getCheckMessage(MSG_KEY, "import"),
+            "19:1: " + getCheckMessage(MSG_KEY, "import"),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
@@ -61,7 +61,7 @@ public void testExample2() throws Exception {
     @Test
     public void testExample3() throws Exception {
         final String[] expected = {
-            "10:1: " + getCheckMessage(MSG_KEY, "import"),
+            "14:1: " + getCheckMessage(MSG_KEY, "import"),
         };
 
         verifyWithInlineConfigParser(getPath("Example3.java"), expected);
@@ -70,7 +70,7 @@ public void testExample3() throws Exception {
     @Test
     public void testExample4() throws Exception {
         final String[] expected = {
-            "13:1: " + getCheckMessage(MSG_KEY, "import"),
+            "18:1: " + getCheckMessage(MSG_KEY, "import"),
         };
 
         verifyWithInlineConfigParser(getPath("Example4.java"), expected);
@@ -79,9 +79,9 @@ public void testExample4() throws Exception {
     @Test
     public void testExample5() throws Exception {
         final String[] expected = {
-            "14:1: " + getCheckMessage(MSG_KEY, "CLASS_DEF"),
-            "20:3: " + getCheckMessage(MSG_KEY, "METHOD_DEF"),
-            "26:5: " + getCheckMessage(MSG_KEY, "CTOR_DEF"),
+            "19:1: " + getCheckMessage(MSG_KEY, "CLASS_DEF"),
+            "25:3: " + getCheckMessage(MSG_KEY, "METHOD_DEF"),
+            "31:5: " + getCheckMessage(MSG_KEY, "CTOR_DEF"),
         };
 
         verifyWithInlineConfigParser(getPath("Example5.java"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceAfterExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceAfterExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceAfterExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceAfterExamplesTest.java
@@ -39,9 +39,9 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "19:12: " + getCheckMessage(MSG_KEY, "."),
-            "24:9: " + getCheckMessage(MSG_KEY, "int"),
-            "28:9: " + getCheckMessage(MSG_KEY, "~"),
+            "23:12: " + getCheckMessage(MSG_KEY, "."),
+            "28:9: " + getCheckMessage(MSG_KEY, "int"),
+            "32:9: " + getCheckMessage(MSG_KEY, "~"),
         };
 
         verifyWithInlineConfigParser(getPath("Example1.java"), expected);
@@ -50,8 +50,8 @@ public void testExample1() throws Exception {
     @Test
     public void testExample2() throws Exception {
         final String[] expected = {
-            "14:12: " + getCheckMessage(MSG_KEY, "."),
-            "21:12: " + getCheckMessage(MSG_KEY, "."),
+            "19:12: " + getCheckMessage(MSG_KEY, "."),
+            "26:12: " + getCheckMessage(MSG_KEY, "."),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCaseDefaultColonExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCaseDefaultColonExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCaseDefaultColonExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCaseDefaultColonExamplesTest.java
@@ -40,11 +40,11 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "15:14: " + getCheckMessage(MSG_KEY, ":"),
-            "19:15: " + getCheckMessage(MSG_KEY, ":"),
-            "27:9: " + getCheckMessage(MSG_KEY, ":"),
-            "31:13: " + getCheckMessage(MSG_KEY, ":"),
-            "38:34: " + getCheckMessage(MSG_KEY, ":"),
+            "19:14: " + getCheckMessage(MSG_KEY, ":"),
+            "23:15: " + getCheckMessage(MSG_KEY, ":"),
+            "31:9: " + getCheckMessage(MSG_KEY, ":"),
+            "35:13: " + getCheckMessage(MSG_KEY, ":"),
+            "42:34: " + getCheckMessage(MSG_KEY, ":"),
         };
 
         verifyWithInlineConfigParser(getNonCompilablePath("Example1.java"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeExamplesTest.java
@@ -39,11 +39,11 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "15:9: " + getCheckMessage(MSG_KEY, "++"),
-            "17:20: " + getCheckMessage(MSG_KEY, ";"),
-            "20:21: " + getCheckMessage(MSG_KEY, ","),
-            "25:12: " + getCheckMessage(MSG_KEY, ";"),
-            "27:14: " + getCheckMessage(MSG_KEY, ":"),
+            "19:9: " + getCheckMessage(MSG_KEY, "++"),
+            "21:20: " + getCheckMessage(MSG_KEY, ";"),
+            "24:21: " + getCheckMessage(MSG_KEY, ","),
+            "29:12: " + getCheckMessage(MSG_KEY, ";"),
+            "31:14: " + getCheckMessage(MSG_KEY, ":"),
         };
 
         verifyWithInlineConfigParser(getPath("Example1.java"), expected);
@@ -52,7 +52,7 @@ public void testExample1() throws Exception {
     @Test
     public void testExample2() throws Exception {
         final String[] expected = {
-            "18:31: " + getCheckMessage(MSG_KEY, "..."),
+            "23:31: " + getCheckMessage(MSG_KEY, "..."),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
@@ -61,8 +61,8 @@ public void testExample2() throws Exception {
     @Test
     public void testExample3() throws Exception {
         final String[] expected = {
-            "16:10: " + getCheckMessage(MSG_KEY, "."),
-            "18:74: " + getCheckMessage(MSG_KEY, "::"),
+            "21:10: " + getCheckMessage(MSG_KEY, "."),
+            "23:74: " + getCheckMessage(MSG_KEY, "::"),
         };
 
         verifyWithInlineConfigParser(getPath("Example3.java"), expected);
@@ -71,8 +71,8 @@ public void testExample3() throws Exception {
     @Test
     public void testExample4() throws Exception {
         final String[] expected = {
-            "16:11: " + getCheckMessage(MSG_KEY, "."),
-            "18:40: " + getCheckMessage(MSG_KEY, "::"),
+            "21:11: " + getCheckMessage(MSG_KEY, "."),
+            "23:40: " + getCheckMessage(MSG_KEY, "::"),
         };
 
         verifyWithInlineConfigParser(getPath("Example4.java"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/OperatorWrapExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/OperatorWrapExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/OperatorWrapExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/OperatorWrapExamplesTest.java
@@ -40,9 +40,9 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "12:24: " + getCheckMessage(MSG_LINE_NEW, "+"),
-            "15:12: " + getCheckMessage(MSG_LINE_NEW, "=="),
-            "23:16: " + getCheckMessage(MSG_LINE_NEW, "/"),
+            "16:24: " + getCheckMessage(MSG_LINE_NEW, "+"),
+            "19:12: " + getCheckMessage(MSG_LINE_NEW, "=="),
+            "27:16: " + getCheckMessage(MSG_LINE_NEW, "/"),
         };
 
         verifyWithInlineConfigParser(getPath("Example1.java"), expected);
@@ -51,16 +51,16 @@ public void testExample1() throws Exception {
     @Test
     public void testExample2() throws Exception {
         final String[] expected = {
-            "16:13: " + getCheckMessage(MSG_LINE_PREVIOUS, "="),
-            "20:13: " + getCheckMessage(MSG_LINE_PREVIOUS, "+="),
-            "24:13: " + getCheckMessage(MSG_LINE_PREVIOUS, "*="),
-            "26:13: " + getCheckMessage(MSG_LINE_PREVIOUS, "-="),
-            "30:13: " + getCheckMessage(MSG_LINE_PREVIOUS, "/="),
-            "32:13: " + getCheckMessage(MSG_LINE_PREVIOUS, "%="),
-            "34:13: " + getCheckMessage(MSG_LINE_PREVIOUS, ">>="),
-            "36:9: " + getCheckMessage(MSG_LINE_PREVIOUS, ">>>="),
-            "38:13: " + getCheckMessage(MSG_LINE_PREVIOUS, "&="),
-            "40:13: " + getCheckMessage(MSG_LINE_PREVIOUS, "<<="),
+            "23:13: " + getCheckMessage(MSG_LINE_PREVIOUS, "="),
+            "27:13: " + getCheckMessage(MSG_LINE_PREVIOUS, "+="),
+            "31:13: " + getCheckMessage(MSG_LINE_PREVIOUS, "*="),
+            "33:13: " + getCheckMessage(MSG_LINE_PREVIOUS, "-="),
+            "37:13: " + getCheckMessage(MSG_LINE_PREVIOUS, "/="),
+            "39:13: " + getCheckMessage(MSG_LINE_PREVIOUS, "%="),
+            "41:13: " + getCheckMessage(MSG_LINE_PREVIOUS, ">>="),
+            "43:9: " + getCheckMessage(MSG_LINE_PREVIOUS, ">>>="),
+            "45:13: " + getCheckMessage(MSG_LINE_PREVIOUS, "&="),
+            "47:13: " + getCheckMessage(MSG_LINE_PREVIOUS, "<<="),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadExamplesTest.java
@@ -42,9 +42,9 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "14:8: " + getCheckMessage(MSG_WS_FOLLOWED, "("),
-            "17:25: " + getCheckMessage(MSG_WS_PRECEDED, ")"),
-            "25:11: " + getCheckMessage(MSG_WS_FOLLOWED, "("),
+            "18:8: " + getCheckMessage(MSG_WS_FOLLOWED, "("),
+            "21:25: " + getCheckMessage(MSG_WS_PRECEDED, ")"),
+            "29:11: " + getCheckMessage(MSG_WS_FOLLOWED, "("),
         };
 
         verifyWithInlineConfigParser(getPath("Example1.java"), expected);
@@ -53,9 +53,9 @@ public void testExample1() throws Exception {
     @Test
     public void testExample2() throws Exception {
         final String[] expected = {
-            "23:27: " + getCheckMessage(MSG_WS_NOT_PRECEDED, ")"),
-            "33:12: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "("),
-            "39:34: " + getCheckMessage(MSG_WS_NOT_PRECEDED, ")"),
+            "28:27: " + getCheckMessage(MSG_WS_NOT_PRECEDED, ")"),
+            "38:12: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "("),
+            "44:34: " + getCheckMessage(MSG_WS_NOT_PRECEDED, ")"),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SeparatorWrapExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SeparatorWrapExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SeparatorWrapExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SeparatorWrapExamplesTest.java
@@ -40,8 +40,8 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "20:21: " + getCheckMessage(MSG_LINE_PREVIOUS, ","),
-            "22:11: " + getCheckMessage(MSG_LINE_PREVIOUS, "."),
+            "24:21: " + getCheckMessage(MSG_LINE_PREVIOUS, ","),
+            "26:11: " + getCheckMessage(MSG_LINE_PREVIOUS, "."),
         };
 
         verifyWithInlineConfigParser(getPath("Example1.java"), expected);
@@ -50,7 +50,7 @@ public void testExample1() throws Exception {
     @Test
     public void testExample2() throws Exception {
         final String[] expected = {
-            "18:36: " + getCheckMessage(MSG_LINE_NEW, "::"),
+            "23:36: " + getCheckMessage(MSG_LINE_NEW, "::"),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
@@ -59,8 +59,8 @@ public void testExample2() throws Exception {
     @Test
     public void testExample3() throws Exception {
         final String[] expected = {
-            "14:8: " + getCheckMessage(MSG_LINE_NEW, ","),
-            "17:17: " + getCheckMessage(MSG_LINE_NEW, ","),
+            "19:8: " + getCheckMessage(MSG_LINE_NEW, ","),
+            "22:17: " + getCheckMessage(MSG_LINE_NEW, ","),
         };
 
         verifyWithInlineConfigParser(getPath("Example3.java"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SingleSpaceSeparatorExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SingleSpaceSeparatorExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SingleSpaceSeparatorExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SingleSpaceSeparatorExamplesTest.java
@@ -39,9 +39,9 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "11:15: " + getCheckMessage(MSG_KEY),
-            "12:13: " + getCheckMessage(MSG_KEY),
-            "17:9: " + getCheckMessage(MSG_KEY),
+            "15:15: " + getCheckMessage(MSG_KEY),
+            "16:13: " + getCheckMessage(MSG_KEY),
+            "21:9: " + getCheckMessage(MSG_KEY),
         };
 
         verifyWithInlineConfigParser(getPath("Example1.java"), expected);
@@ -50,10 +50,10 @@ public void testExample1() throws Exception {
     @Test
     public void testExample2() throws Exception {
         final String[] expected = {
-            "13:19: " + getCheckMessage(MSG_KEY),
-            "15:28: " + getCheckMessage(MSG_KEY),
-            "17:47: " + getCheckMessage(MSG_KEY),
-            "23:8: " + getCheckMessage(MSG_KEY),
+            "18:19: " + getCheckMessage(MSG_KEY),
+            "20:28: " + getCheckMessage(MSG_KEY),
+            "22:47: " + getCheckMessage(MSG_KEY),
+            "28:8: " + getCheckMessage(MSG_KEY),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypecastParenPadExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypecastParenPadExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypecastParenPadExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypecastParenPadExamplesTest.java
@@ -42,10 +42,10 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "13:11: " + getCheckMessage(MSG_WS_FOLLOWED, "("),
-            "13:17: " + getCheckMessage(MSG_WS_PRECEDED, ")"),
-            "17:21: " + getCheckMessage(MSG_WS_PRECEDED, ")"),
-            "21:14: " + getCheckMessage(MSG_WS_FOLLOWED, "("),
+            "17:11: " + getCheckMessage(MSG_WS_FOLLOWED, "("),
+            "17:17: " + getCheckMessage(MSG_WS_PRECEDED, ")"),
+            "21:21: " + getCheckMessage(MSG_WS_PRECEDED, ")"),
+            "25:14: " + getCheckMessage(MSG_WS_FOLLOWED, "("),
         };
 
         verifyWithInlineConfigParser(getPath("Example1.java"), expected);
@@ -54,10 +54,10 @@ public void testExample1() throws Exception {
     @Test
     public void testExample2() throws Exception {
         final String[] expected = {
-            "16:11: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "("),
-            "20:11: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "("),
-            "20:15: " + getCheckMessage(MSG_WS_NOT_PRECEDED, ")"),
-            "22:16: " + getCheckMessage(MSG_WS_NOT_PRECEDED, ")"),
+            "21:11: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "("),
+            "25:11: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "("),
+            "25:15: " + getCheckMessage(MSG_WS_NOT_PRECEDED, ")"),
+            "27:16: " + getCheckMessage(MSG_WS_NOT_PRECEDED, ")"),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAfterExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAfterExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAfterExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAfterExamplesTest.java
@@ -39,17 +39,17 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "15:12: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "if"),
-            "18:16: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, ","),
-            "20:5: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "for"),
-            "22:5: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "try"),
-            "24:5: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "try"),
-            "26:12: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "finally"),
-            "28:30: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "finally"),
-            "30:12: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "catch"),
-            "32:5: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "synchronized"),
-            "38:5: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "return"),
-            "45:9: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "yield"),
+            "19:12: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "if"),
+            "22:16: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, ","),
+            "24:5: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "for"),
+            "26:5: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "try"),
+            "28:5: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "try"),
+            "30:12: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "finally"),
+            "32:30: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "finally"),
+            "34:12: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "catch"),
+            "36:5: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "synchronized"),
+            "42:5: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "return"),
+            "49:9: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "yield"),
         };
 
         verifyWithInlineConfigParser(getNonCompilablePath("Example1.java"), expected);
@@ -58,8 +58,8 @@ public void testExample1() throws Exception {
     @Test
     public void testExample2() throws Exception {
         final String[] expected = {
-            "14:14: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, ";"),
-            "17:17: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, ","),
+            "19:14: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, ";"),
+            "22:17: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, ","),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundExamplesTest.java
--- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundExamplesTest.java
+++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundExamplesTest.java
@@ -40,20 +40,20 @@ protected String getPackageLocation() {
     @Test
     public void testExample1() throws Exception {
         final String[] expected = {
-            "11:20: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "{"),
-            "11:20: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "{"),
-            "11:21: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "}"),
-            "15:5: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "else"),
-            "15:9: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "{"),
-            "19:33: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "{"),
-            "19:34: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "}"),
-            "22:24: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "->"),
-            "22:26: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "{"),
-            "22:26: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "{"),
-            "22:27: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "}"),
-            "25:24: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "{"),
-            "25:24: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "{"),
-            "25:25: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "}"),
+            "15:20: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "{"),
+            "15:20: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "{"),
+            "15:21: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "}"),
+            "19:5: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "else"),
+            "19:9: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "{"),
+            "23:33: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "{"),
+            "23:34: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "}"),
+            "26:24: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "->"),
+            "26:26: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "{"),
+            "26:26: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "{"),
+            "26:27: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "}"),
+            "29:24: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "{"),
+            "29:24: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "{"),
+            "29:25: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "}"),
         };
 
         verifyWithInlineConfigParser(getPath("Example1.java"), expected);
@@ -62,22 +62,22 @@ public void testExample1() throws Exception {
     @Test
     public void testExample2() throws Exception {
         final String[] expected = {
-            "15:10: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "="),
-            "15:10: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "="),
-            "18:6: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "+="),
-            "18:6: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "+="),
-            "21:6: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "*="),
-            "21:6: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "*="),
-            "24:6: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "-="),
-            "24:6: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "-="),
-            "27:6: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "/="),
-            "27:6: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "/="),
-            "30:6: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "%="),
-            "30:6: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "%="),
-            "33:6: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, ">>="),
-            "33:6: " + getCheckMessage(MSG_WS_NOT_PRECEDED, ">>="),
-            "36:6: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, ">>>="),
-            "36:6: " + getCheckMessage(MSG_WS_NOT_PRECEDED, ">>>="),
+            "21:10: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "="),
+            "21:10: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "="),
+            "24:6: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "+="),
+            "24:6: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "+="),
+            "27:6: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "*="),
+            "27:6: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "*="),
+            "30:6: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "-="),
+            "30:6: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "-="),
+            "33:6: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "/="),
+            "33:6: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "/="),
+            "36:6: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "%="),
+            "36:6: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "%="),
+            "39:6: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, ">>="),
+            "39:6: " + getCheckMessage(MSG_WS_NOT_PRECEDED, ">>="),
+            "42:6: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, ">>>="),
+            "42:6: " + getCheckMessage(MSG_WS_NOT_PRECEDED, ">>>="),
         };
 
         verifyWithInlineConfigParser(getPath("Example2.java"), expected);
@@ -86,7 +86,7 @@ public void testExample2() throws Exception {
     @Test
     public void testExample3() throws Exception {
         final String[] expected = {
-            "12:22: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "}"),
+            "17:22: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "}"),
         };
 
         verifyWithInlineConfigParser(getPath("Example3.java"), expected);
@@ -95,8 +95,8 @@ public void testExample3() throws Exception {
     @Test
     public void testExample4() throws Exception {
         final String[] expected = {
-            "13:8: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "="),
-            "13:8: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "="),
+            "18:8: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "="),
+            "18:8: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "="),
         };
 
         verifyWithInlineConfigParser(getPath("Example4.java"), expected);
@@ -105,8 +105,8 @@ public void testExample4() throws Exception {
     @Test
     public void testExample5() throws Exception {
         final String[] expected = {
-            "13:28: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "{"),
-            "13:29: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "}"),
+            "18:28: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "{"),
+            "18:29: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "}"),
         };
 
         verifyWithInlineConfigParser(getPath("Example5.java"), expected);
@@ -115,8 +115,8 @@ public void testExample5() throws Exception {
     @Test
     public void testExample6() throws Exception {
         final String[] expected = {
-            "15:10: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "="),
-            "15:10: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "="),
+            "20:10: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "="),
+            "20:10: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "="),
         };
 
         verifyWithInlineConfigParser(getPath("Example6.java"), expected);
@@ -125,8 +125,8 @@ public void testExample6() throws Exception {
     @Test
     public void testExample7() throws Exception {
         final String[] expected = {
-            "16:10: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "="),
-            "16:10: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "="),
+            "21:10: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "="),
+            "21:10: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "="),
         };
 
         verifyWithInlineConfigParser(getPath("Example7.java"), expected);
@@ -135,8 +135,8 @@ public void testExample7() throws Exception {
     @Test
     public void testExample8() throws Exception {
         final String[] expected = {
-            "14:10: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "="),
-            "14:10: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "="),
+            "19:10: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "="),
+            "19:10: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "="),
         };
 
         verifyWithInlineConfigParser(getPath("Example8.java"), expected);
@@ -145,8 +145,8 @@ public void testExample8() throws Exception {
     @Test
     public void testExample9() throws Exception {
         final String[] expected = {
-            "13:10: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "="),
-            "13:10: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "="),
+            "18:10: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "="),
+            "18:10: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "="),
         };
 
         verifyWithInlineConfigParser(getPath("Example9.java"), expected);
@@ -155,9 +155,9 @@ public void testExample9() throws Exception {
     @Test
     public void testExample10() throws Exception {
         final String[] expected = {
-            "13:10: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "="),
-            "13:10: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "="),
-            "16:19: " + getCheckMessage(MSG_WS_NOT_PRECEDED, ":"),
+            "18:10: " + getCheckMessage(MSG_WS_NOT_PRECEDED, "="),
+            "18:10: " + getCheckMessage(MSG_WS_NOT_FOLLOWED, "="),
+            "21:19: " + getCheckMessage(MSG_WS_NOT_PRECEDED, ":"),
         };
 
         verifyWithInlineConfigParser(getPath("Example10.java"), expected);
diff --git a/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebeforecasedefaultcolon/Example1.java b/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebeforecasedefaultcolon/Example1.java
--- a/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebeforecasedefaultcolon/Example1.java
+++ b/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebeforecasedefaultcolon/Example1.java
@@ -1,5 +1,9 @@
-/*
-NoWhitespaceBeforeCaseDefaultColon
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="NoWhitespaceBeforeCaseDefaultColon"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespaceafter/Example1.java b/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespaceafter/Example1.java
--- a/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespaceafter/Example1.java
+++ b/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespaceafter/Example1.java
@@ -1,5 +1,9 @@
-/*
-WhitespaceAfter
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="WhitespaceAfter"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example1.java
@@ -1,5 +1,9 @@
-/*
-AbbreviationAsWordInName
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="AbbreviationAsWordInName"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example2.java
@@ -1,7 +1,12 @@
-/*
-AbbreviationAsWordInName
-ignoreStatic = false
-ignoreOverriddenMethods = false
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="AbbreviationAsWordInName">
+      <property name="ignoreStatic" value="false"/>
+      <property name="ignoreOverriddenMethods" value="false"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example3.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example3.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example3.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example3.java
@@ -1,9 +1,14 @@
-/*
-AbbreviationAsWordInName
-allowedAbbreviationLength = 0
-allowedAbbreviations = XML,URL,O
-ignoreStatic = false
-tokens = VARIABLE_DEF,CLASS_DEF
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="AbbreviationAsWordInName">
+      <property name="allowedAbbreviationLength" value="0"/>
+      <property name="allowedAbbreviations" value="XML,URL,O"/>
+      <property name="ignoreStatic" value="false"/>
+      <property name="tokens" value="VARIABLE_DEF,CLASS_DEF"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example4.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example4.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example4.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example4.java
@@ -1,9 +1,14 @@
-/*
-AbbreviationAsWordInName
-allowedAbbreviationLength = 1
-allowedAbbreviations = CSV
-ignoreStatic = true
-tokens = VARIABLE_DEF
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="AbbreviationAsWordInName">
+      <property name="allowedAbbreviationLength" value="1"/>
+      <property name="allowedAbbreviations" value="CSV"/>
+      <property name="ignoreStatic" value="true"/>
+      <property name="tokens" value="VARIABLE_DEF"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example5.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example5.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example5.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example5.java
@@ -1,10 +1,15 @@
-/*
-AbbreviationAsWordInName
-allowedAbbreviationLength = 0
-ignoreFinal = false
-ignoreStatic = false
-ignoreStaticFinal = true
-tokens = VARIABLE_DEF
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="AbbreviationAsWordInName">
+      <property name="allowedAbbreviationLength" value="0"/>
+      <property name="ignoreFinal" value="false"/>
+      <property name="ignoreStatic" value="false"/>
+      <property name="ignoreStaticFinal" value="true"/>
+      <property name="tokens" value="VARIABLE_DEF"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example6.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example6.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example6.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example6.java
@@ -1,10 +1,15 @@
-/*
-AbbreviationAsWordInName
-allowedAbbreviationLength = 0
-ignoreFinal = false
-ignoreStatic = true
-ignoreStaticFinal = false
-tokens = VARIABLE_DEF
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="AbbreviationAsWordInName">
+      <property name="allowedAbbreviationLength" value="0"/>
+      <property name="ignoreFinal" value="false"/>
+      <property name="ignoreStatic" value="true"/>
+      <property name="ignoreStaticFinal" value="false"/>
+      <property name="tokens" value="VARIABLE_DEF"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example7.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example7.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example7.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/Example7.java
@@ -1,7 +1,12 @@
-/*
-AbbreviationAsWordInName
-allowedAbbreviations = ALLOWED
-ignoreStaticFinal = false
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="AbbreviationAsWordInName">
+      <property name="allowedAbbreviations" value="ALLOWED"/>
+      <property name="ignoreStaticFinal" value="false"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abstractclassname/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abstractclassname/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abstractclassname/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abstractclassname/Example1.java
@@ -1,5 +1,9 @@
-/*
-AbstractClassName
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="AbstractClassName"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abstractclassname/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abstractclassname/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abstractclassname/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abstractclassname/Example2.java
@@ -1,6 +1,11 @@
-/*
-AbstractClassName
-ignoreModifier = true
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="AbstractClassName">
+      <property name="ignoreModifier" value="true"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abstractclassname/Example3.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abstractclassname/Example3.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abstractclassname/Example3.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abstractclassname/Example3.java
@@ -1,6 +1,11 @@
-/*
-AbstractClassName
-ignoreName = true
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="AbstractClassName">
+      <property name="ignoreName" value="true"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abstractclassname/Example4.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abstractclassname/Example4.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abstractclassname/Example4.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abstractclassname/Example4.java
@@ -1,6 +1,11 @@
-/*
-AbstractClassName
-format = ^Generator.+$
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="AbstractClassName">
+      <property name="format" value="^Generator.+$"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/constantname/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/constantname/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/constantname/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/constantname/Example1.java
@@ -1,5 +1,9 @@
-/*
-ConstantName
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="ConstantName"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/constantname/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/constantname/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/constantname/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/constantname/Example2.java
@@ -1,6 +1,11 @@
-/*
-ConstantName
-format = ^log(ger)?$|^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="ConstantName">
+      <property name="format" value="^log(ger)?$|^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/constantname/Example3.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/constantname/Example3.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/constantname/Example3.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/constantname/Example3.java
@@ -1,7 +1,12 @@
-/*
-ConstantName
-applyToPublic = false
-applyToProtected = false
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="ConstantName">
+      <property name="applyToPublic" value="false"/>
+      <property name="applyToProtected" value="false"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/sizes/lambdabodylength/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/sizes/lambdabodylength/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/sizes/lambdabodylength/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/sizes/lambdabodylength/Example1.java
@@ -1,5 +1,9 @@
-/*
-LambdaBodyLength
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="LambdaBodyLength"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/sizes/lambdabodylength/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/sizes/lambdabodylength/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/sizes/lambdabodylength/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/sizes/lambdabodylength/Example2.java
@@ -1,6 +1,11 @@
-/*
-LambdaBodyLength
-max = 5
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="LambdaBodyLength">
+      <property name="max" value="5"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptyforinitializerpad/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptyforinitializerpad/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptyforinitializerpad/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptyforinitializerpad/Example1.java
@@ -1,5 +1,9 @@
-/*
-EmptyForInitializerPad
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="EmptyForInitializerPad"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptyforinitializerpad/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptyforinitializerpad/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptyforinitializerpad/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptyforinitializerpad/Example2.java
@@ -1,6 +1,11 @@
-/*
-EmptyForInitializerPad
-option = space
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="EmptyForInitializerPad">
+      <property name="option" value="space"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptyforiteratorpad/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptyforiteratorpad/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptyforiteratorpad/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptyforiteratorpad/Example1.java
@@ -1,5 +1,9 @@
-/*
-EmptyForIteratorPad
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="EmptyForIteratorPad"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptyforiteratorpad/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptyforiteratorpad/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptyforiteratorpad/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptyforiteratorpad/Example2.java
@@ -1,6 +1,11 @@
-/*
-EmptyForIteratorPad
-option = space
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="EmptyForIteratorPad">
+      <property name="option" value="space"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example1.java
@@ -1,5 +1,9 @@
-/*
-EmptyLineSeparator
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="EmptyLineSeparator"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example2.java
@@ -1,6 +1,11 @@
-/*
-EmptyLineSeparator
-tokens = VARIABLE_DEF, METHOD_DEF
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="EmptyLineSeparator">
+      <property name="tokens" value="VARIABLE_DEF, METHOD_DEF"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example3.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example3.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example3.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example3.java
@@ -1,6 +1,11 @@
-/*
-EmptyLineSeparator
-allowNoEmptyLineBetweenFields = true
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="EmptyLineSeparator">
+      <property name="allowNoEmptyLineBetweenFields" value="true"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example4.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example4.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example4.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example4.java
@@ -1,6 +1,11 @@
-/*
-EmptyLineSeparator
-allowMultipleEmptyLines = false
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="EmptyLineSeparator">
+      <property name="allowMultipleEmptyLines" value="false"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example5.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example5.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example5.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/emptylineseparator/Example5.java
@@ -1,6 +1,11 @@
-/*
-EmptyLineSeparator
-allowMultipleEmptyLinesInsideClassMembers = false
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="EmptyLineSeparator">
+      <property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/filetabcharacter/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/filetabcharacter/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/filetabcharacter/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/filetabcharacter/Example1.java
@@ -1,5 +1,7 @@
-/*
-FileTabCharacter
+/*xml
+<module name="Checker">
+  <module name="FileTabCharacter"/>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/filetabcharacter/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/filetabcharacter/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/filetabcharacter/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/filetabcharacter/Example2.java
@@ -1,6 +1,9 @@
-/*
-FileTabCharacter
-eachLine = true
+/*xml
+<module name="Checker">
+  <module name="FileTabCharacter">
+    <property name="eachLine" value="true"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/filetabcharacter/Example3.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/filetabcharacter/Example3.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/filetabcharacter/Example3.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/filetabcharacter/Example3.java
@@ -1,6 +1,9 @@
-/*
-FileTabCharacter
-fileExtensions = java, xml
+/*xml
+<module name="Checker">
+  <module name="FileTabCharacter">
+    <property name="fileExtensions" value="java, xml"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/methodparampad/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/methodparampad/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/methodparampad/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/methodparampad/Example1.java
@@ -1,5 +1,9 @@
-/*
-MethodParamPad
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="MethodParamPad"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/methodparampad/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/methodparampad/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/methodparampad/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/methodparampad/Example2.java
@@ -1,8 +1,13 @@
-/*
-MethodParamPad
-allowLineBreaks = true
-option = space
-tokens = METHOD_DEF
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="MethodParamPad">
+      <property name="allowLineBreaks" value="true"/>
+      <property name="option" value="space"/>
+      <property name="tokens" value="METHOD_DEF"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example1.java
@@ -1,5 +1,9 @@
-/*
-NoLineWrap
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="NoLineWrap"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example2.java
@@ -1,5 +1,9 @@
-/*
-NoLineWrap
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="NoLineWrap"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example3.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example3.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example3.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example3.java
@@ -1,5 +1,9 @@
-/*
-NoLineWrap
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="NoLineWrap"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example4.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example4.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example4.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example4.java
@@ -1,6 +1,11 @@
-/*
-NoLineWrap
-tokens = IMPORT
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="NoLineWrap">
+      <property name="tokens" value="IMPORT"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example5.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example5.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example5.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nolinewrap/Example5.java
@@ -1,6 +1,11 @@
-/*
-NoLineWrap
-tokens = CLASS_DEF, METHOD_DEF, CTOR_DEF
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="NoLineWrap">
+      <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespaceafter/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespaceafter/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespaceafter/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespaceafter/Example1.java
@@ -1,5 +1,9 @@
-/*
-NoWhitespaceAfter
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="NoWhitespaceAfter"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespaceafter/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespaceafter/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespaceafter/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespaceafter/Example2.java
@@ -1,7 +1,12 @@
-/*
-NoWhitespaceAfter
-allowLineBreaks = false
-tokens = DOT
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="NoWhitespaceAfter">
+      <property name="allowLineBreaks" value="false"/>
+      <property name="tokens" value="DOT"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebefore/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebefore/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebefore/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebefore/Example1.java
@@ -1,5 +1,9 @@
-/*
-NoWhitespaceBefore
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="NoWhitespaceBefore"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebefore/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebefore/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebefore/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebefore/Example2.java
@@ -1,6 +1,11 @@
-/*
-NoWhitespaceBefore
-allowLineBreaks = true
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="NoWhitespaceBefore">
+      <property name="allowLineBreaks" value="true"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebefore/Example3.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebefore/Example3.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebefore/Example3.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebefore/Example3.java
@@ -1,6 +1,11 @@
-/*
-NoWhitespaceBefore
-tokens = METHOD_REF, DOT
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="NoWhitespaceBefore">
+      <property name="tokens" value="METHOD_REF, DOT"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebefore/Example4.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebefore/Example4.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebefore/Example4.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebefore/Example4.java
@@ -1,7 +1,12 @@
-/*
-NoWhitespaceBefore
-tokens = METHOD_REF, DOT
-allowLineBreaks = true
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="NoWhitespaceBefore">
+      <property name="tokens" value="METHOD_REF, DOT"/>
+      <property name="allowLineBreaks" value="true"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/operatorwrap/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/operatorwrap/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/operatorwrap/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/operatorwrap/Example1.java
@@ -1,5 +1,9 @@
-/*
-OperatorWrap
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="OperatorWrap"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/operatorwrap/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/operatorwrap/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/operatorwrap/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/operatorwrap/Example2.java
@@ -1,8 +1,15 @@
-/*
-OperatorWrap
-option = eol
-tokens = ASSIGN, DIV_ASSIGN, PLUS_ASSIGN, MINUS_ASSIGN, STAR_ASSIGN, MOD_ASSIGN, \
-           SR_ASSIGN, BSR_ASSIGN, SL_ASSIGN, BXOR_ASSIGN, BOR_ASSIGN,BAND_ASSIGN
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="OperatorWrap">
+      <property name="option" value="eol"/>
+      <property name="tokens"
+                value="ASSIGN,DIV_ASSIGN,PLUS_ASSIGN,MINUS_ASSIGN,STAR_ASSIGN,
+                       MOD_ASSIGN,SR_ASSIGN,BSR_ASSIGN,SL_ASSIGN,
+                       BXOR_ASSIGN,BOR_ASSIGN,BAND_ASSIGN"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/parenpad/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/parenpad/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/parenpad/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/parenpad/Example1.java
@@ -1,5 +1,9 @@
-/*
-ParenPad
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="ParenPad"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/parenpad/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/parenpad/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/parenpad/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/parenpad/Example2.java
@@ -1,7 +1,12 @@
-/*
-ParenPad
-tokens = LITERAL_FOR, LITERAL_CATCH, SUPER_CTOR_CALL
-option = space
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="ParenPad">
+      <property name="tokens" value="LITERAL_FOR, LITERAL_CATCH, SUPER_CTOR_CALL"/>
+      <property name="option" value="space"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/separatorwrap/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/separatorwrap/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/separatorwrap/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/separatorwrap/Example1.java
@@ -1,5 +1,9 @@
-/*
-SeparatorWrap
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="SeparatorWrap"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/separatorwrap/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/separatorwrap/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/separatorwrap/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/separatorwrap/Example2.java
@@ -1,7 +1,12 @@
-/*
-SeparatorWrap
-tokens = METHOD_REF
-option = nl
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="SeparatorWrap">
+      <property name="tokens" value="METHOD_REF"/>
+      <property name="option" value="nl"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/separatorwrap/Example3.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/separatorwrap/Example3.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/separatorwrap/Example3.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/separatorwrap/Example3.java
@@ -1,7 +1,12 @@
-/*
-SeparatorWrap
-tokens = COMMA
-option = nl
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="SeparatorWrap">
+      <property name="tokens" value="COMMA"/>
+      <property name="option" value="nl"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/Example1.java
@@ -1,5 +1,9 @@
-/*
-SingleSpaceSeparator
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="SingleSpaceSeparator"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/Example2.java
@@ -1,6 +1,11 @@
-/*
-SingleSpaceSeparator
-validateComments = true
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="SingleSpaceSeparator">
+      <property name="validateComments" value="true"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/typecastparenpad/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/typecastparenpad/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/typecastparenpad/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/typecastparenpad/Example1.java
@@ -1,5 +1,9 @@
-/*
-TypecastParenPad
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="TypecastParenPad"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/typecastparenpad/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/typecastparenpad/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/typecastparenpad/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/typecastparenpad/Example2.java
@@ -1,6 +1,11 @@
-/*
-TypecastParenPad
-option = space
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="TypecastParenPad">
+      <property name="option" value="space"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespaceafter/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespaceafter/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespaceafter/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespaceafter/Example2.java
@@ -1,6 +1,11 @@
-/*
-WhitespaceAfter
-tokens = COMMA, SEMI
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="WhitespaceAfter">
+      <property name="tokens" value="COMMA, SEMI"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example1.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example1.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example1.java
@@ -1,5 +1,9 @@
-/*
-WhitespaceAround
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="WhitespaceAround"/>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example10.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example10.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example10.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example10.java
@@ -1,6 +1,11 @@
-/*
-WhitespaceAround
-ignoreEnhancedForColon = false
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="WhitespaceAround">
+      <property name="ignoreEnhancedForColon" value="false"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example2.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example2.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example2.java
@@ -1,8 +1,14 @@
-/*
-WhitespaceAround
-tokens = ASSIGN, DIV_ASSIGN, PLUS_ASSIGN, MINUS_ASSIGN, STAR_ASSIGN, \
-         MOD_ASSIGN, SR_ASSIGN, BSR_ASSIGN, SL_ASSIGN, BXOR_ASSIGN, \
-         BOR_ASSIGN, BAND_ASSIGN
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="WhitespaceAround">
+      <property name="tokens"
+                value="ASSIGN, DIV_ASSIGN, PLUS_ASSIGN, MINUS_ASSIGN, STAR_ASSIGN,
+                       MOD_ASSIGN, SR_ASSIGN, BSR_ASSIGN, SL_ASSIGN, BXOR_ASSIGN,
+                       BOR_ASSIGN, BAND_ASSIGN"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example3.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example3.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example3.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example3.java
@@ -1,6 +1,11 @@
-/*
-WhitespaceAround
-tokens = LCURLY, RCURLY
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="WhitespaceAround">
+      <property name="tokens" value="LCURLY, RCURLY"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example4.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example4.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example4.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example4.java
@@ -1,6 +1,11 @@
-/*
-WhitespaceAround
-allowEmptyMethods = true
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="WhitespaceAround">
+      <property name="allowEmptyMethods" value="true"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example5.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example5.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example5.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example5.java
@@ -1,6 +1,11 @@
-/*
-WhitespaceAround
-allowEmptyConstructors = true
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="WhitespaceAround">
+      <property name="allowEmptyConstructors" value="true"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example6.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example6.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example6.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example6.java
@@ -1,6 +1,11 @@
-/*
-WhitespaceAround
-allowEmptyTypes = true
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="WhitespaceAround">
+      <property name="allowEmptyTypes" value="true"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example7.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example7.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example7.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example7.java
@@ -1,6 +1,11 @@
-/*
-WhitespaceAround
-allowEmptyLoops = true
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="WhitespaceAround">
+      <property name="allowEmptyLoops" value="true"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example8.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example8.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example8.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example8.java
@@ -1,6 +1,11 @@
-/*
-WhitespaceAround
-allowEmptyLambdas = true
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="WhitespaceAround">
+      <property name="allowEmptyLambdas" value="true"/>
+    </module>
+  </module>
+</module>
 
 
 */
diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example9.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example9.java
--- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example9.java
+++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/whitespacearound/Example9.java
@@ -1,6 +1,11 @@
-/*
-WhitespaceAround
-allowEmptyCatches = true
+/*xml
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="WhitespaceAround">
+      <property name="allowEmptyCatches" value="true"/>
+    </module>
+  </module>
+</module>
 
 
 */


Test patch:
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/bdd/InlineConfigParser.java b/src/test/java/com/puppycrawl/tools/checkstyle/bdd/InlineConfigParser.java
--- a/src/test/java/com/puppycrawl/tools/checkstyle/bdd/InlineConfigParser.java
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/bdd/InlineConfigParser.java
@@ -36,8 +36,14 @@
 import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import java.util.stream.Collectors;
 
+import org.xml.sax.InputSource;
+
+import com.puppycrawl.tools.checkstyle.ConfigurationLoader;
+import com.puppycrawl.tools.checkstyle.PropertiesExpander;
 import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
 
 public final class InlineConfigParser {
 
@@ -91,6 +97,11 @@ public final class InlineConfigParser {
     /** The String "(null)". */
     private static final String NULL_STRING = "(null)";
 
+    private static final String LATEST_DTD = String.format(Locale.ROOT,
+            "<!DOCTYPE module PUBLIC \"%s\" \"%s\">%n",
+            ConfigurationLoader.DTD_PUBLIC_CS_ID_1_3,
+            ConfigurationLoader.DTD_PUBLIC_CS_ID_1_3);
+
     /**
      * Checks in which violation message is not specified in input file and have more than
      * one violation message key.
@@ -165,8 +176,61 @@ private static void setModules(TestInputConfiguration.Builder testInputConfigBui
             throw new CheckstyleException("Config not specified on top."
                 + "Please see other inputs for examples of what is required.");
         }
-        int lineNo = 1;
-        do {
+
+        final List<String> inlineConfig = getInlineConfig(lines);
+        final boolean isXmlConfig = "/*xml".equals(lines.get(0));
+
+        if (isXmlConfig) {
+            final String stringXmlConfig = LATEST_DTD + String.join("", inlineConfig);
+            final InputSource inputSource = new InputSource(new StringReader(stringXmlConfig));
+            final Configuration xmlConfig = ConfigurationLoader.loadConfiguration(
+                inputSource, new PropertiesExpander(System.getProperties()),
+                    ConfigurationLoader.IgnoredModulesOptions.EXECUTE
+            );
+            final String configName = xmlConfig.getName();
+            if (!"Checker".equals(configName)) {
+                throw new CheckstyleException(
+                        "First module should be Checker, but was " + configName);
+            }
+            handleXmlConfig(testInputConfigBuilder, inputFilePath, xmlConfig.getChildren());
+        }
+        else {
+            handleKeyValueConfig(testInputConfigBuilder, inputFilePath, inlineConfig);
+        }
+    }
+
+    private static List<String> getInlineConfig(List<String> lines) {
+        return lines.stream()
+                .skip(1)
+                .takeWhile(line -> !line.startsWith("*/"))
+                .collect(Collectors.toList());
+    }
+
+    private static void handleXmlConfig(TestInputConfiguration.Builder testInputConfigBuilder,
+                                        String inputFilePath,
+                                        Configuration... modules)
+            throws CheckstyleException {
+
+        for (Configuration module: modules) {
+            final String moduleName = module.getName();
+            if ("TreeWalker".equals(moduleName)) {
+                handleXmlConfig(testInputConfigBuilder, inputFilePath, module.getChildren());
+            }
+            else {
+                final ModuleInputConfiguration.Builder moduleInputConfigBuilder =
+                    new ModuleInputConfiguration.Builder();
+                setModuleName(moduleInputConfigBuilder, inputFilePath, moduleName);
+                setProperties(inputFilePath, module, moduleInputConfigBuilder);
+                testInputConfigBuilder.addChildModule(moduleInputConfigBuilder.build());
+            }
+        }
+    }
+
+    private static void handleKeyValueConfig(TestInputConfiguration.Builder testInputConfigBuilder,
+                                             String inputFilePath, List<String> lines)
+            throws CheckstyleException, IOException {
+        int lineNo = 0;
+        while (lineNo < lines.size()) {
             final ModuleInputConfiguration.Builder moduleInputConfigBuilder =
                     new ModuleInputConfiguration.Builder();
             setModuleName(moduleInputConfigBuilder, inputFilePath, lines.get(lineNo));
@@ -174,8 +238,10 @@ private static void setModules(TestInputConfiguration.Builder testInputConfigBui
             testInputConfigBuilder.addChildModule(moduleInputConfigBuilder.build());
             do {
                 lineNo++;
-            } while (lines.get(lineNo).isEmpty() || !lines.get(lineNo - 1).isEmpty());
-        } while (!lines.get(lineNo).startsWith("*/"));
+            } while (lineNo < lines.size()
+                    && lines.get(lineNo).isEmpty()
+                    || !lines.get(lineNo - 1).isEmpty());
+        }
     }
 
     private static String getFullyQualifiedClassName(String filePath, String moduleName)
@@ -296,6 +362,35 @@ else if (value.startsWith("(default)")) {
         }
     }
 
+    private static void setProperties(String inputFilePath, Configuration module,
+                                      ModuleInputConfiguration.Builder moduleInputConfigBuilder)
+            throws CheckstyleException {
+        final String[] getPropertyNames = module.getPropertyNames();
+        for (final String propertyName : getPropertyNames) {
+            final String propertyValue = module.getProperty(propertyName);
+
+            if ("file".equals(propertyName)) {
+                final String filePath = getResolvedPath(propertyValue, inputFilePath);
+                moduleInputConfigBuilder.addNonDefaultProperty(propertyName, filePath);
+            }
+            else {
+                if (NULL_STRING.equals(propertyValue)) {
+                    moduleInputConfigBuilder.addNonDefaultProperty(propertyName, null);
+                }
+                else {
+                    moduleInputConfigBuilder.addNonDefaultProperty(propertyName, propertyValue);
+                }
+            }
+        }
+
+        final Map<String, String> messages = module.getMessages();
+        for (final Map.Entry<String, String> entry : messages.entrySet()) {
+            final String key = entry.getKey();
+            final String value = entry.getValue();
+            moduleInputConfigBuilder.addModuleMessage(key, value);
+        }
+    }
+
     private static void setViolations(TestInputConfiguration.Builder inputConfigBuilder,
                                       List<String> lines, boolean useFilteredViolations)
             throws ClassNotFoundException, CheckstyleException {