Is there any way to get SonarQube to only warn about incomplete Switch statements?
问题 Using Java, SonarQube is complaining about switch statements on enum values not having a default: case. The reasoning given is: "The requirement for a final default clause is defensive programming. The clause should either take appropriate action, or contain a suitable comment as to why no action is taken. When the switch covers all current values of an enum - and especially when it doesn't - a default case should still be used because there is no guarantee that the enum won't be extended." I