I’m running SonarQube Enterprise Edition Version 8.2 (build 32929). I have it running in an Azure Pipeline and it runs without error unless it finds some C code.
If it finds some C code, then it tries to run the wrapper script build-wrapper-linux-x86-64, which I already installed in /usr/local/bin, where I also installed the other files in the zip. However when the pipeline runs it still fails with an error java.lang.IllegalStateException: java.nio.file.NoSuchFileException saying that it can’t find build-wrapper-dump.json.
Is this file supposed to already exist in the directory where it’s looking, or is it automatically generated by something else such as the wrapper script?
You need to run the build-wrapper command that generates build-wrapper-dump.json before running the scanner. You will find all the needed information here.
I was able to get it to create the json file, but now it fails saying the json file is empty. Is there a way to make it skip this so it can analyze the rest of the repo?
If you want to analyze C, build-wrapper.json should have the commands that were used to build your C files. if you didn’t have any C built by the command given to build-wrapper-linux-x86-64, the .json file would be empty and you would get this error. Do you have C files built by the command passed to the build-wrapper-linux-x86-64?