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
HSEARCH-3478 + HSEARCH-3425 Code cleanup #1879
Conversation
... the rule also accepts switches where we define a case for each enum constants.
… differ only by capitalization
… naming convention
…ed into an "if-then-else" statement
…_SET" should not be used
…a input parameter when its type is inferred
…pertySource detected by Sonar
…ent 'new CompletableFuture[futures.size()]'
Some warnings allowed me to find out they were not covered by tests.
…ntainer extractors Spotted thanks to warnings about BuiltinContainers.OPTIONAL_LONG not being used.
Note for future reference. IDEA doesn't offer a global view of all warnings in the codebase, making it difficult to keep the number of warnings to 0. The feature was requested a long time ago and never implemented, so it's unlikely it will ever be: https://youtrack.jetbrains.com/issue/IDEA-68854 Thus I wanted to find some solution to be aware of added warnings and fix them as I code. I tried to fail the build on warnings by passing I also tried to make all warnings appear in IDEA in the "Messages" view, shown when we trigger a full build. That's better than nothing, I thought. Well, no: by passing I'm not going to go back to Eclipse, because even without a global view of warnings, IDEA is still better. And more importantly I won't force people working on Hibernate Search to use one IDE or another. So... I'm out of idea. I guess we'll have to periodically clean up the codebase... |
Approved over the chat. Merged, thanks! |
https://hibernate.atlassian.net//browse/HSEARCH-3425
https://hibernate.atlassian.net//browse/HSEARCH-3478
Note I don't expect a full review, it would be quite boring.
@gsmet, could you simply double-check that the warnings are gone when you use Eclipse? They are gone in my instance of Eclipse, but who knows.
Of course you need to ignore the legacy modules; personally I moved the non-legacy modules to a separate working set, I configured the "Problems" view to only show problems in the selected projects, and I selected the "non-legacy" working set.