Skip to content

Is possible to turn of wildcard import rule? #1154

Closed

Description

@poliveira-fuze

Or even allow to to something "AvoidStarImport" or "AvoidWildcardImport"

Activity

  1. tbroyer commented on Aug 30, 2024

    @tbroyer
    Contributor

    Not sure I understand what you're asking but Google Java Format can only remove unused imports or reorder them, it cannot "expand" wildcard imports, because it's not a compiler

    You can use Error Prone though with its (disabled by default) WildcardImport rule, and probably other tools, to fail your build if sources contain a wildcard import. But you'll need an IDE to expand the wildcard.

  2. poliveira-fuze commented on Aug 30, 2024

    @poliveira-fuze
    Author

    I did not understood

    You can use Error Prone though with its (...)

    Aside that rule webpage, what ErrorProne can do?

    And if it's disabled how can I enable it?

  3. poliveira-fuze commented on Aug 30, 2024

    @poliveira-fuze
    Author

    From what I read, ErrorProne does not change anything. Just point out on the compilation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions