switch (propertyName) {
case Constants.PROPERTY_CONTAINS_BEEF:
case Constants.PROPERTY_RECIPECONTENT_BEEF:
case Constants.PROPERTY_RECIPECONTENT_CALF:
contains.add(FoodCategory.BEEF.name());
return true;
…
HTH,
Anand
How did you customise exactly?
--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/7yUqzSvaw_g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/c2eb4d68-74df-4cd5-a990-1be79a5c804e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
It's good practise to let it trigger the violation in most cases however here it's discretionary and the "admin" sonar users can triage and decide if it should be false positive / won't fix. e.g. we might think the switch statements could be refactored into separate method to handle different cases. However most of the time we would simply consider this acceptable and flag as a false positive.I believe Sonar are doing work on a slightly new CC calculation which may take into account switch statements like this more.