Skip to content

Ability to configure static import sorting to match behaviour of IntelliJ IDEA #879

Closed
@hakanai

Description

@hakanai

If you have the following configuration:

importOrder('java', 'javax', '', 'acme', 'com.acme', '\\#')

Spotless will sort the static imports like this:

import static com.github.tomakehurst.wiremock.client.WireMock.*;
import static com.github.tomakehurst.wiremock.client.WireMock.equalTo;
import static org.hamcrest.Matchers.*;

But IntelliJ IDEA will sort the static imports like this:

import static com.github.tomakehurst.wiremock.client.WireMock.equalTo;
import static com.github.tomakehurst.wiremock.client.WireMock.*;
import static org.hamcrest.Matchers.*;

This causes constant fighting between IDEA and Spotless so it would be nice if we could configure spotless to say that the wildcard always comes last.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions