SonarQube for IntelliJ plugin version: 10.16.1.80464
IntelliJ version: 2024.3.2
Programming language you’re coding in: C++
Is connected mode used:
SonarQube Server
And a thorough description of the problem / question:
I use CLion with SonarQube for IDE and SonarQube server.
The Sonar scanner see valid errors in CPP files, thats great, but show lots of false error in header files
I use CMAKE and PCH header, so the header files doesn’t includes any other files
example code:
I made the connection between CLion and SonarQube server, but the analysis run in the CLion (on the sonar server I didn’t see these errors, so that is works fine)
These errors shows in the CLion, on the server everything is fine
Thank you for clarifying the situation. In order to investigate this issue, Can you generate a reproducer file and share it with us by adding the following analysis property sonar.cfamily.reproducer=PATH_OF_FILE_TO_ANALYZE. and running the analysis on your file of interest.
In the log, you should see that a file is generated. Please send it to us. If you think this file contains private information, let us know, we’ll send you a private message that will allow you to send it privately.
I added to the properties:
[sonarlint-analysis-engine] INFO sonarlint - sonar.cfamily.reproducer=/Users/myuser/sonar.analysis
Run the analysis, but the file didn’t created …
And the analysis didn’t works I add an error to the file, but:
[sonarlint-analysis-engine] INFO sonarlint - Analysis detected 0 issues and 0 Security Hotspots in 101ms
Make sure you have the sonar.cfamily.reproducer=/path/of/file/to/analyze.cpp set in your analysis properties
Run analysis for the file of interest, which should be the same file provided in the sonar.cfamily.reproducer analysis property, namely /path/of/file/to/analyze.cpp
Share the full SonarQube for IDE logs with us, If you believe the logs might contain sensitive data, and You prefer to share them privately, please let me know, I can start a private thread with you