Troubleshooting
What to do when you have problems running an analysis in SonarQube for IntelliJ.
Knowing where to begin looking for information is the first step to reaching out for help. Many answers to commonly found problems can be found on the SonarQube for IDE channel of the Sonar community forum. See below for the basic steps to access the SonarQube for IDE logs when the analysis results are not what you expected.
Before posting to the Community, make sure that you have your logs ready by following the instructions below.
How to get SonarQube for IDE logs
Open the SonarQube for IDE tool window: View > Tool Windows > SonarQube for IDE.
Enable the Verbose output in the tool window settings.
Find the logs in the
Log
tab of the tool window.Copy the full verbose logs, from the start of SonarQube for IntelliJ, up to the problem you're investigating
How to get SonarQube for IDE thread dumps
In some cases, it can be useful to extract thread dumps from the running instance of your IDE for debugging; thread dumps can help us investigate UI freeze issues or threading problems.
If SonarQube for IDE does not start or stops working and the IDE is still running, thread dumps are necessary to properly troubleshoot the problem before the IDE is restarted. If you restart the IDE, some information about what was happening when it failed will be lost. Fortunately, thread dumps are easy to obtain for both SonarQube for IDE and your IDE.
JetBrains IDEs have an internal mechanism to generate a thread dump. Please see the JetBrains documentation for the details.
If the UI is still reactive, you have another alternative: select Help > Collect Logs and Diagnostic Data to create a .zip file containing one or several
threadDumps-XXX
folders. In these folders, you should find one.txt
file with the current date and time that will contain the logs.
Once obtained, please report your error to the Community forum. Your thread dump may contain sensitive details and if it’s required for further troubleshooting, it will be possible to share your thread dump privately.
Troubleshooting Connected Mode setup
No matching project found
No matching project is found because:
It’s best if you already have the project open in your IDE, otherwise SonarQube for IDE might not be able to find a matching file.
SonarQube for IDE can get confused if you have more than one project open in different windows. Please close the non-applicable project and try again.
If these solutions don’t help, follow the instructions for Project binding to manually configure your project binding.
No matching issue found
SonarQube for IntelliJ can’t find your issue because:
You might not be on the same branch.
The issue was fixed, or the source code may be different from the analyzed version.
Troubleshooting unexpected analysis results
Sometimes, issues found on the server differ from those found locally by SonarQube for IDE. Usually, the server-side rule configuration (your quality profile) is to blame; however, it could be something more than that. Maybe your local build configuration and system dependencies don’t align with your DevOps pipeline, or it could simply be that the issue, due to its complexity, is only detectable by SonarQube Server or SonarQube Cloud.
The collapsible below lists some of the most commonly encountered reasons, along with some details that will help you troubleshoot discrepancies.
Language-specific troubleshooting
FAQ
Are my SonarScanner properties applied to SonarQube for IDE?
No. Scanner properties you may have defined in the sonar-project.properties
or pom.xml
files (for example sonar.sources
or sonar.projectBasedir
) only make sense when using the SonarScanner in the command line. SonarQube for IDE tries to use IDE metadata to avoid other configurations.
If you want to share some configuration between SonarScanners and SonarQube for IntelliJ, like File exclusions, or some specific analyzer properties (see Scan my project), the best way is to use Connected mode and set the configuration in the SonarQube (Server, Cloud) UI.
Last updated
Was this helpful?