Reusing checkstyle checks to define xml-based custom module
<p>In a project I am working on we have a lot of custom Checkstyle checks. For example, we exclude all types of things using RegexpSingleline modules. Our checkstyle rules looks like:</p>



<pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE module PUBLIC
      "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
      "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"&gt;
&lt;module name="Checker"&gt;

    &lt;!-- Disable this --&gt;
    &lt;module name="RegexpSingleline"&gt;
        ...
    &lt;/module&gt;

    &lt;!-- Disable that --&gt;
    &lt;module name="RegexpSingleline"&gt;
        ...
    &lt;/module&gt;

    ...
&lt;/module&gt;
</code></pre>

<p>Unfortunately, this means that when we want to disable one check for one file, we usually end up disabling a <em>lot</em> of checks, e.g., all those based on RegexpSingleline.</p>

<p>I would have expected, but cannot seem to find, the possibility to define "composite" checks, something like:</p>

<pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE module PUBLIC
      "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
      "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"&gt;
&lt;module name="Checker"&gt;

    &lt;!-- Disable this --&gt;
    &lt;myCheck name="DisableNastyThing1"&gt;
        &lt;module name="RegexpSingleline"&gt;
            ...
        &lt;/module&gt;
    &lt;/myCheck&gt;

    &lt;!-- Disable that --&gt;
    &lt;myCheck name="DisableNastyThing2"&gt;
        &lt;module name="RegexpSingleline"&gt;
            ...
        &lt;/module&gt;
    &lt;/myCheck&gt;

    ...
&lt;/module&gt;
</code></pre>

<p>Suppressing <em>DisableNastyThing1</em> or <em>DisableNastyThing2</em> would work exactly like suppressing a module. In other words, the <em>myCheck</em> XML element name would denote the fact that the check is not mapped to an actual Java class implementing AbstractCheck or so, but instead it is mapped to some generic check that executes the checks nested into it.</p>

<p>Is there already such a concept in Checkstyle and I failed to find it or what?</p>