Affects PMD Version: 6.26.0
Description:
https://github.com/pmd/pmd/blob/master/pmd-java/src/main/resources/category/java/bestpractices.xml#L1277
The message of the rule is misleading for the case of exhaustive enums. When an enum case is missing it will prompt the developer to add a default
case but an alternative solution which is likely more correct is to add the missing cases and make the switch exhaustive. I propose the message is updated to:
Switch statements should have a default label or be exhaustive in case of enums
I also have a question, what is the purpose of the <description>
element in rules? Is there any way it could be printed alongside the rule message when the rule fails when using pmd-maven-plugin
?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4