title: How do I get Checkstyle CustomImportOrder to work with IntelliJ properly?
body: <p>I'm trying to get Checkstyle (via maven-checkstyle-plugin) to have my IntelliJ imports checked by using the Checkstyle CustomImportOrder module. Despite having ordered my imports according to IntelliJ's default rules, Checkstyle still says the import order is wrong. </p>
  
  <p><em>Here's my imports (ordered according to IntelliJ rules (ctrl+o):</em></p>
  
  <pre><code>import org.codehaus.jackson.JsonNode;
  
  import javax.sql.rowset.serial.SQLOutputImpl;
  import java.util.ArrayList;
  import java.util.List;
  </code></pre>
  
  <p><em>Here's the warning message from Checkstyle:</em></p>
  
  <pre><code>[WARNING] src\main\java\com\example\hej\EnKlass.java[5] (imports) CustomImportOrder: Import statement is in the wrong order. Should be in the 'SPECIAL_IMPORTS' group.
  [WARNING] src\main\java\com\example\hej\EnKlass.java[6] (imports) CustomImportOrder: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.
  [WARNING] src\main\java\com\example\hej\EnKlass.java[7] (imports) CustomImportOrder: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.
  </code></pre>
  
  <p><em>Here's my checkstyle.xml CustomImportOrder rules (as recommended for IntelliJ by the Checkstyle site):</em></p>
  
  <pre><code>&lt;module name="CustomImportOrder"&gt;
      &lt;property name="customImportOrderRules" value="THIRD_PARTY_PACKAGE###SPECIAL_IMPORTS###STANDARD_JAVA_PACKAGE###STATIC"/&gt;
      &lt;property name="specialImportsRegExp" value="^javax\."/&gt;
      &lt;property name="standardPackageRegExp" value="^java\."/&gt;
      &lt;property name="sortImportsInGroupAlphabetically" value="true"/&gt;
      &lt;property name="separateLineBetweenGroups" value="false"/&gt;
  &lt;/module&gt;
  </code></pre>
  
  <p>What might be the problem here? I have been trying to switch the rules around, with no luck. I have also tried to remove/manipulate the regexes with no luck.</p>