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

Use impsort-maven-plugin to automaticall check java imports #4

Closed
wants to merge 4 commits into from

Conversation

sbernard31
Copy link
Owner

@sbernard31 sbernard31 commented Jun 10, 2022

Currently eclipse configuration allow to clean this automatically.

But for external contribution, often this is not done.

impsort-maven-plugin can be used to check this but not support automatic wildcard * import like eclipse. (see revelc/impsort-maven-plugin#21)

Wildcard import are also considered as bad practice. (see https://checkstyle.org/config_imports.html)

So maybe is to :

  • change eclipse configuration to not allow it.
  • add checkstyle to check this is not used

Note that if contributor which does not use eclipse should be able to sort import with :

mvn impsort:sort

@sbernard31
Copy link
Owner Author

So maybe is to :

  • change eclipse configuration to not allow it.
  • add checkstyle to check this is not used

Done in last commit.

@sbernard31 sbernard31 closed this Jul 13, 2022
@sbernard31 sbernard31 deleted the import branch July 29, 2022 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant