Build wrapper file found but 0 files were analyzed

I have also started seeing the same issue when building with travis and clang5.
The same branch built just fine a few weeks ago and now it no longer does. Something must have changed on the travis side related to sonar cloud.

(Sonar cloud is at the end of the following logs, just scroll at the very bottom)
See this new build created from the develop branch (I created a fresh branch from it to debug this):
Old build for the develop branch that passed fine:

I have been using clang5 and sonar cloud with little to no changes to the configuration or build script for many months now without any issues, and on multiple projects but this is the first build I’ve kicked in the last few weeks due to vacation and now it no longer works. The build works but sonar cloud appears to fail to find any generated object files.

You can find the travis file here:

Two lines execute, the first cleans anything from previous builds and sets up the projects/makefiles. The second one builds everything (in RTM we just build unit tests for now, it is header only). No build errors happen and all objects files and executables compile fine.

Hi @Nicholas_Frechette,

I moved your post to a new topic.

we added a safety check to make sure people get a correct analysis. It means that you never had a correct analysis.

Looking at your repository the issue comes from the fact that you set sonar.sources to includes folder which contains only header files, which means we are not able to match any compiler call (on compilation units) caught during build with the files you are importing into SonarCloud.

A number of my projects are setup similarly where they are header only with some C++ tools/tests. The sonar.sources should include both .h and .cpp files even if I don’t care about the .cpp files? (e.g. unit test files).

Hi @Nicholas_Frechette,

given that you are developing a header only library the answer is yes, header files are analyzed in the context of compilation units, in order to analyze them successfully we must know the compiler configuration and header files are not necessarily compilable.