Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Inconsistent use of glob imports #2076

Copy link
Copy link

Description

@solonovamax
Issue body actions

Some classes use glob imports, while others don't. The use of glob imports across files seems to be rather inconsistent.

Currently, with spotless, there doesn't seem to be a way to enforce using/disallowing glob imports, however there is an open issue for it: diffplug/spotless#649.
Some comments on the issue suggest using

<replaceRegex>
    <name>Remove wildcard imports</name>
    <searchRegex>import\s+(?:static\s+)?[^\*\s]+\*;(\r\n|\r|\n)</searchRegex>
    <replacement>$1</replacement>
</replaceRegex>

to remove all the glob imports, however this solution will simply remove them and won't replace them with the appropriate imports, causing the compile to fail.

Opened due to discussion in #2074

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.