sonarqube included header unkown sources

Viewed 161

I have a C++ application that includes foo.h which is provided by a 3rd party tool. foo.h includes bar.h, which I do not have. Is there a way to suppress "cannot find the sources for '# include "bar.h'"?

sonar.projectName=MyyAp
sonar.projectBaseDir=src
sonar.sources=.
sonar.cxx.includeDirectories=foo.h,src/includes

SonarQube 6.7.1
Sonar-Scanner 3.0.3.778

1 Answers

Have you tried using sonar.exclusions=bar.h ?

Update Just exclude both foo.h and bar.h file as they are provided by 3rd party tool. You can also try //NOSONAR tag in the foo.h file

sonar.exclusions=foo.h, bar.h

Related