'xxxxx.sql' is not located under the root directory

  • ALM used ( Azure DevOps)
  • CI system used (Azure DevOps,)
  • Languages of the repository T-SQL
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
  • Steps to reproduce

Try to scan a projet composed of 160 sql files related to a .sqlproj type project.
the .csproj file is located in a parallel folder :

(Folder-A).sqlproj folder
(Folder-B).csproj folder

My csproj file (in Folder B) refer to sql files in the (Folder-A).
For that reason, when I try to build my .Netcore Project , I issued a build command on the .csproj file.
The scanner complains by skipping all .sql files because :
’xxxxx.sql’ is not located under the root directory /vsts/_work/1/s/xxxx/xxxxxxx.Database_Build(This is my Folder-B).

How can I tell the scanner to follow the references to the other project files located in Folder A ?

Thanks.

Hi @teleferix

You may have to specifiy a sonar.projectBaseDir that is common of both, so one level higher.

For instance, if you have /root/folderA/csproj and /root/folderB/sqlproj, you may setup sonar.projectBaseDir=/root

HTH,
Mickaël