scalastyle / scalastyle-sbt-plugin

scalastyle-sbt-plugin
Apache License 2.0
139 stars 52 forks source link

ImportOrderChecker grouping not working as expected #76

Open redkhalil opened 4 years ago

redkhalil commented 4 years ago

This is my configuration

<check level="error" class="org.scalastyle.scalariform.ImportOrderChecker" enabled="true">
        <parameters>
            <parameter name="groups">java,scala,others,mycompany</parameter>
            <parameter name="group.java">javax?\..+</parameter>
            <parameter name="group.scala">scala\..+</parameter>
            <parameter name="group.mycompany">com.mycompany\..+</parameter>
            <parameter name="group.others">.+</parameter>
        </parameters>
    </check>

and the following import is being flagged as invalid by scalastyle, reporting There should be no empty line separating imports in the same group.

com.rabbitmq.this

com.mycompany.that

However if I change the order to java,scala,mycompany,others then there is no error reported.