3

I am trying to run sonar-scanner for C code using build wrapper output. I am able to get the result for one folder using sonar scanner which created build wrapper output in linux and scanner publishes result in Sonar Dashboard But i am not able to get the consolidated output in a single project. For example, Folder1 and folder2 are coming as separate project in sonar dashboard, each folder has its own build wrapper output and i am not able to consolidate into one project

Folder1 |---- Makefile, test.c

Folder2 |---- Makefil, test2.c

  • Please share what you already tried. Also, provide the minimal information to reproduce this. – Alex Aug 05 '20 at 08:47
  • build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory make clean ( In Folder 1) build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory make ( In Folder 1) build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory make clean ( In Folder 2) build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory make ( In Folder 2) – Naresh Kumar Aug 05 '20 at 09:56
  • I executed these commands and it is creating the directory "build_wrapper_output_directory" in respective folders with JSON file. When i run sonar scanner separately in each folders, i can see sonar analysis done in Sonar dashboard. – Naresh Kumar Aug 05 '20 at 09:58
  • Problem is now i am not able to consolidate both the sonar analysis in one project and see in Sonar dashboard – Naresh Kumar Aug 05 '20 at 09:58
  • I had the same question, look like you need to create a script that builds them both so you can get a single build-wrapper output. https://community.sonarsource.com/t/build-wrapper-multiple-projects-modules/14371/2 – GCB613 Aug 28 '20 at 05:04

0 Answers0