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

Consider adding unused imports removal or java-lint package. #662

Open
mshima opened this issue Apr 25, 2024 · 6 comments
Open

Consider adding unused imports removal or java-lint package. #662

mshima opened this issue Apr 25, 2024 · 6 comments

Comments

@mshima
Copy link
Member

mshima commented Apr 25, 2024

I've created https://github.com/mshima/java-lint to remove unused imports in generator-jhipster generated code.
Would be nice if it could be moved to jhipster organization in java-parser/prettier-java repository.

@murdos
Copy link

murdos commented Apr 25, 2024

I think there have already been some discussions about how far prettier-java should go with imports, in #201.
The conclusion - as I understand it - was that prettier is a formatter, but should not act as a linter. So this might be out of the scope of prettier.

@mshima mshima changed the title Consider adding unused imports removal project. Consider adding unused imports removal package. Apr 25, 2024
@mshima
Copy link
Member Author

mshima commented Apr 25, 2024

Yes, I understand that it should be not be implemented in prettier-plugin-java.
The proposal is to add a new package in this repository.

@mshima mshima changed the title Consider adding unused imports removal package. Consider adding unused imports removal or java-lint package. Apr 25, 2024
@DanielFran
Copy link
Member

@clementdessoude Any thoughts on that?
@mshima Since the development is already done, working and used in the generator, can you provide a PR so we can evaluate the impacts?

@pascalgrimaud
Copy link
Member

I agree with @murdos : this might be out of the scope of prettier

@mshima : if you want to include this project to jhipster organization, it should be at github.com/jhispter/java-lint
Just send an email to the mailing to discuss about it

@mshima
Copy link
Member Author

mshima commented May 3, 2024

I agree with @murdos : this might be out of the scope of prettier

@mshima : if you want to include this project to jhipster organization, it should be at github.com/jhispter/java-lint Just send an email to the mailing to discuss about it

I only have interest to move to the java-parser repository to keep java-lint updated with it.
I don't have interest to move to jhipster organization if the structure will be kept the sample.

@mshima
Copy link
Member Author

mshima commented May 3, 2024

can you provide a PR so we can evaluate the impacts?

@DanielFran the idea is to move the entire project to https://github.com/jhipster/prettier-java/tree/main/packages/java-lint.
As impact, maybe we should migrate prettier-java to vitest to match java-lint.

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

No branches or pull requests

4 participants