On our code C++ base we are running sonarqube (enterprise edition v 9.9) on a regular basis. To ease developer work, we would like to deploy sonarLint in connected mode so that we can catch findings the earliest possible
Nevertheless, I am facing the issue that it seems that SonarLint is missing some of the “critical issues” found by Sonarqube (rule cpp:S3519).
When opening the target file under VS 2022 running SonarLint (v7.1.0 ), I get some of the findings in the output message, but not all .
So I checked the SonarLint output message and got this:
Refreshing PCH file for C:\XXX\src\harmonisation.cpp. PCH file location: C:\Users\mgur\AppData\Local\Temp\SLVS\PCH\33712268-25df-4d33-8826-2feacf674ecd\PCH.preamble [SecretsAnalyzer] Analyzing C:\XXX\src\harmonisation.cpp Loaded settings from "C:\Users\mgur\AppData\Roaming\SonarLint for Visual Studio\Bindings\YYY\secrets_settings.json". [RuleSettings] Using connected mode settings. User-specified settings in settings.json will be ignored. [SecretsAnalyzer] Finished analyzing C:\XXX\src\WBI\harmonisation.cpp, analysis time: 0.119s [SecretsAnalyzer] Found 0 issue(s) for C:\XXX\src\harmonisation.cpp Loaded settings from "C:\Users\mgur\AppData\Roaming\SonarLint for Visual Studio\Bindings\YYY\cpp_settings.json". [RuleSettings] Using connected mode settings. User-specified settings in settings.json will be ignored. [CFamily] Calculating effective rule settings... [CFamily] Note: the following CFamily rules are not available in SonarLint: cpp:S5536, c:S5536, cpp:S4830, c:S4830, cpp:S5527, c:S5527 [CLangAnalyzer] Analyzing C:\XXX\src\harmonisation.cpp Execution cancelled. [CLangAnalyzer] Aborted analysis of C:\XXX\src\harmonisation.cpp, analysis has been re-triggered or has timed-out.
Could “this abort” explain the fact that issues are missing ?
Why does it abort ?
Why some issues reported by sonarqube are not there ?
Is there a way to fix it (as the exact same code is properly analyzed by Sonarqube) ? : is there some timeout we could fix
the code to analyze is compiling properly.
the code is less than 2000 lines long
Thank you in advance for your support