-1

I am trying to use sonar for my project, I've launched scanning, but it was failed and I saw a few errors:

error   17-Jul-2018 18:44:45    18:44:45.846 WARN: [/home/myuser/server/RequestHandler.h:5]: cannot find the sources for '#include <string>'
error   17-Jul-2018 18:44:45    18:44:45.847 WARN: [/home/myuser/server/RequestHandler.h:6]: cannot find the sources for '#include <iostream>'
error   17-Jul-2018 18:44:45    18:44:45.847 WARN: [/home/myuser/server/RequestHandler.h:7]: cannot find the sources for '#include <algorithm>'
error   17-Jul-2018 18:44:45    18:44:45.847 WARN: [/home/myuser/server/RequestHandler.h:8]: cannot find the sources for '#include <memory>'

RequestHandler.h - this is my file, which includes some std libs, but I don't need to scan system files How to specify sonar, that I want to scan only files in directory server, and do not touch system libs ?

πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190
DSfsg
  • 1
  • https://stackoverflow.com/q/21103175/1531971 and https://docs.sonarqube.org/display/SONAR/Narrowing+the+Focus#NarrowingtheFocus-IgnoreFiles and so on. –  Jul 17 '18 at 16:11

1 Answers1

0

please check following properties

  sonar.sources=./    #analysis directory    
  sonar.projectBaseDir=./    #Working dir
  sonar.exclusions=**/test/** # exclusions if you have any.
Derrick
  • 3,669
  • 5
  • 35
  • 50
Danesh G
  • 121
  • 4