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

Clean code: add checkstyle rule to prevent unused imports #24845

Closed
escay opened this issue Mar 7, 2024 · 2 comments · Fixed by #24846
Closed

Clean code: add checkstyle rule to prevent unused imports #24845

escay opened this issue Mar 7, 2024 · 2 comments · Fixed by #24846
Milestone

Comments

@escay
Copy link
Contributor

escay commented Mar 7, 2024

Add the rule:
<module name="UnusedImports" />
to:

https://github.com/eclipse-ee4j/glassfish/blob/5829ac5e2aed76402d08dc51752223ccb72ff4ae/qa/src/main/resources/org/glassfish/qa/config/checkstyle/checkstyle.xml#L82C1-L85C42

and clean up relevant source files.

@dmatej
Copy link
Contributor

dmatej commented Mar 7, 2024

Ah, I was looking forward for this, don't tell me you already started! If you did, I will wait :-)

@escay
Copy link
Contributor Author

escay commented Mar 7, 2024

I already tried, but I made a mistake of not testing using the full build profile. Need to undo some test class changes. I suspect it is almost done.

escay added a commit to escay/glassfish that referenced this issue Mar 7, 2024
@pzygielo pzygielo linked a pull request Mar 8, 2024 that will close this issue
dmatej added a commit that referenced this issue Mar 8, 2024
Fixes issue #24845 - add new checkstyle rule: UnusedImports
@dmatej dmatej added this to the 7.0.14 milestone Mar 8, 2024
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 a pull request may close this issue.

2 participants