title: How to test more than just java files using the Checkstyle Gradle plugin
body: <p>We use <a href="http://checkstyle.sourceforge.net/" rel="nofollow">Checkstyle</a> to enforce basic code quality rules in our multi-project <a href="http://www.gradle.org/" rel="nofollow">Gradle</a> build. Some of these rules apply across all file types, not just Java files, but we can't figure out how to configure the <a href="http://www.gradle.org/docs/current/userguide/checkstyle_plugin.html" rel="nofollow">Checkstyle Plugin</a> to look at anything other than <code>$projectDir/src/$sourceSet/java</code>.</p>
  
  <p>One of the most basic rules we'd like to enforce is that tab characters never be used. The relevant bits of <code>checkstyle.xml</code>:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;module name="Checker"&gt;
    &lt;module name="FileTabCharacter"&gt;
      &lt;property name="eachLine" value="true"/&gt;
    &lt;/module&gt;
  &lt;/module&gt;
  </code></pre>
  
  <p>and the snippet of <code>build.gradle</code> that configures the plugin:</p>
  
  <pre class="lang-groovy prettyprint-override"><code>apply plugin: 'checkstyle'
  checkstyle {
    configFile = new File(rootDir, 'checkstyle.xml')
  }
  </code></pre>
  
  <p>In addition to <code>java/**/*</code> we'd also like to check all files in <code>conf/**/*</code> and <code>www/**/*</code> (assuming include specs are relative to the source set root). However, if I try adding those include rules:</p>
  
  <pre class="lang-groovy prettyprint-override"><code>apply plugin: 'checkstyle'
  checkstyle {
    configFile = new File(rootDir, 'checkstyle.xml')
    include 'conf/**/*'
    include 'www/**/*'
  }
  </code></pre>
  
  <p>we get the following error:</p>
  
  <pre><code>&gt; Could not find method include() for arguments [conf/**/*] on org.gradle.api.plugins.quality.CheckstyleExtension_Decorated@467763f.
  </code></pre>