google/google-java-format

Is possible to turn of wildcard import rule?

poliveira-fuze opened this issue · 3 comments

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

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.

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?

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