Skip to content

'JSON Compilation Database' sensor slow #2383

@thyros

Description

@thyros

Describe the bug
Hi, I'm trying to run sonar-cxx on my project.
I'm having problems getting it working when I set the sonar.cxx.jsonCompilationDatabase parameter.
Looking at the logs the execution cannot pass the parsing step:

04:51:25 03:51:25.433 DEBUG: Sensors : CXX -> CXX Clang-Tidy report import -> Zero Coverage Sensor -> Java CPD Block Indexer
04:51:25 03:51:25.433 INFO: Sensor CXX [cxx]
04:51:25 03:51:25.479 DEBUG: Parsing 'JSON Compilation Database' format

With the above parameter removed, the whole scan succeeds.

My compiler_commands.json is about 130KB and 35K lines.

Thanks

To Reproduce
Steps to reproduce the behavior:

  1. Generate compile_commands.json using e.g. Ninja Generator
  2. Configure sonar-cxx by setting sonar.cxx.jsonCompilationDatabase
  3. Run sonar-scanner

Expected behavior
Compilation Database is parsed and therefore source files are also parsed correctly

Desktop (please complete the following information):

  • OS: Linux
  • SonarQube version: 8.9.2.46101
  • cxx plugin version: 2.0.7.3119
  • sonar-scanner version: 4.6.2.2472

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions