-
Notifications
You must be signed in to change notification settings - Fork 38.4k
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
Apply checkstyle rule UnusedImports
#34477
Apply checkstyle rule UnusedImports
#34477
Conversation
b6a0cbd
to
1509c5e
Compare
Signed-off-by: Vincent Potucek <[email protected]>
1509c5e
to
9135e97
Compare
is this any good? |
I think this PR should stick to its original intent: apply checkstyle rules for imports to the main sourceset. Can you please add the "AvoidStarImport, "UnusedImports", "RedundantImport" modules to the main checkstyle configuration (not the "nohttp" one which has a separate goal) and only keep the changes required to make the build pass? |
Sorry I misread the diff in your initial attempt. Import rules were already applied in the main checkstyle configuration it seems. If those don't apply in the framework-docs module there might be a checkstyle suppression rule that does this. Beside finding why those aren't applied in framework-docs, I don't think any other change is required. |
Found it, it's not a suppression rule. We could manually apply this conventions plugin in the framework-docs module. We might see a lot of issues that don't really make sense from a code snippet perspective, which is what framework-docs is all about. |
I've tried to Our samples need some flexibility with the code style and I don't think that spending time on enforcing stricter code style in reference docs code snippets is time well spend on our side. I'm closing this PR. |
I saw the rules are not fully aligned. Assuming the minimum approach will be shared, such as avoiding used ballast as already approached.
UnusedImports
PS: This is just a suggestion to serve as a basis for discussion—no need to merge this all at once in a big bang. I can also split it up according to priorities (separation of concerns).