so you have a multi module maven project
- adding the Maven parent-module
won't work, you need instead add the sonar resource names of particular sub modules.
The recommended way is to have a idea module per maven sub project and configure sonar resource per that idea module
public static ProblemHighlightType toProblemHighlightType(String sonarSeverity) {
if (StringUtils.isBlank(sonarSeverity)) {
return ProblemHighlightType.GENERIC_ERROR_OR_WARNING;
} else {
sonarSeverity = sonarSeverity.toUpperCase();
if (SonarSeverity.BLOCKER.toString().equals(sonarSeverity) || SonarSeverity.CRITICAL.toString().equals(sonarSeverity)) {
return ProblemHighlightType.ERROR;
} else if (SonarSeverity.MAJOR.toString().equals(sonarSeverity)) {
return ProblemHighlightType.GENERIC_ERROR_OR_WARNING;
} else if (SonarSeverity.INFO.toString().equals(sonarSeverity) || SonarSeverity.MINOR.toString().equals(sonarSeverity)) {
return ProblemHighlightType.WEAK_WARNING;
} else {
return ProblemHighlightType.GENERIC_ERROR_OR_WARNING;
}
}
}see aslo https://github.com/sonar-intellij-plugin/sonar-intellij-plugin/issues/95 for how to filter critical issues.
>Without such filter the plugin is rather useless, because you want to fix issues according to priority.
cannot agree, the main use case for the plugin is to prevent devs from producing NEW issues, independent from how many issues you have. Illiminate all sonar issues in old project is an illusion like 100% test coverage.