- SonarQube Developer Edition Version 7.7 (build 23042), sonar-maven-plugin:22.214.171.1241:sonar, for full plugin list see next message
- what are you trying to achieve: to get a green analysis in SonarQube
- what have you tried so far to achieve this: see below
Issue is similar to Unable to suppress pull request issue because drop down option missing but in my case it’s an Java project and the external analyzer is Checkstyle. I did not find a configuration in SonarQube to disable external analyzers.
I am able to reproduce the issue by this change in the
diff --git a/.gitignore b/.gitignore index 015d6d77f..656fbda24 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,3 @@ hs_err_pid* # Include Groovy binaries !groovy-*/bin !groovy-*/**/*.jar - -# Sharpen working directories -sharpen
About 3K new issues have appeared. The bulk of them are about lines longer than 80 characters. Our internal coding standard is 120 characters. We have since long activated the rule squid:S00103 and configured it accordingly. We have since long deactivated the rule checkstyle:com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck because it is a duplicate. However these new issues have a different rule ID: checkstyle:sizes.LineLengthCheck. This rule cannot be found in the SonarQube rules. The issues are at status Open and there is no drop down to change them to Won’t Fix. Normally rules have a little link icon next to their rule ID that brings you to their detailed rule page, these don’t.
I have verified the imported
checkstyle-result.xml file and it contains errors com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck but no errors sizes.LineLengthCheck. So it is unclear to me where these issues come from, and why they appear on the commit after the commit that made a change to
In trying to reproduce the issue, I created a new branch and merged in all the commits one by one and did a SonarQube analysis each time. This time, on the commit after the commit that changed
.gitignore, I did not get 3K issues but over 10K issues, including “regular” SonarQube issues that do have corresponding rules and that can be closed. So about 7K closeable issues and 3K uncloseable issues. The 7K extra issues are years old and are technical debt that we in the past have accepted as-is, but now these issues are resurfacing.
After reverting the
.gitignore change, all issues are gone again.