Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WildcardImport should support regex exclusions #506

Closed
rock3r opened this issue Oct 20, 2017 · 7 comments
Closed

WildcardImport should support regex exclusions #506

rock3r opened this issue Oct 20, 2017 · 7 comments

Comments

@rock3r
Copy link
Contributor

rock3r commented Oct 20, 2017

Currently WildcardImport only checks if a given wildcard import matches exactly entries from a set of exclusions, but it should support regexes because a lot of people have wildcard imports for stuff like Kotlin Android Extension's kotlinx.android.synthetic.* packages, which are very easy to allow with a regex but almost impossible to exclude without.

Having kotlinx.android.synthetic use star imports is a default IDE configuration so we should likely allow those by default too.

@arturbosch
Copy link
Member

Agree, we also have the logic for it see LateInitUsage.excludeAnnotatedProperties and the Excludes class.

@arturbosch
Copy link
Member

arturbosch commented Oct 21, 2017

Just checked out. It is already implemented. The config property was just absent ;)
Edit: Having a list of default annotation patterns seems fine for me. Are there more common patterns in Android that should be excluded by default?

@rock3r
Copy link
Contributor Author

rock3r commented Oct 21, 2017

Hmmm not that I know of. That was a glaring example as it's a default one in Android Studio (and I suppose IDEA), and Android Kotlin projects get the Android Kotlin extensions by default in the template...

@rock3r
Copy link
Contributor Author

rock3r commented Oct 22, 2017

So these are the ones the IDE allows and converts to wildcards by default:

image

I suppose we should have those as defaults

@arturbosch
Copy link
Member

I've added intellij's defaults to the default config ^^

@arturbosch arturbosch added this to the next milestone Oct 25, 2017
@rock3r
Copy link
Contributor Author

rock3r commented Oct 25, 2017

Great, thanks :)

@lock
Copy link

lock bot commented Jun 20, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants