Im very beginning in sonarcube and i trying to analize a asp net core project.
Im using:
Developer edition version 9.1.0.47736
In my project I include several sql scripts, but the parsing of these seems to be skipped, my project is just almost entirely composed of these scripts.
I have set in proprties of project to : Patterns used to exclude some files from coverage report = **/.
Do I need to set something else to have control over the sql scripts?
Thanks
You don’t mention how you’re analyzing. I assume you’re using the SonarScanner for .NET. From the docs:
For older-style projects, the scanner will only analyze files that are listed in the .csproj or .vbproj project file… To enable the analysis of other types of files, include them in the project file.
im using sonarqube.net right, vs 2019 and net core 3.1, and these scripts are included in my project.
Actually the scanner analize the project but not inside sql files that have .sql extensions.
Under Administration > General Settings > T-SQL in Comma-separated list of suffixes for files to analyze i have : .tsql, .sql
What I take from this error is that it’s trying to take your JAVA_HOME value and add \bin\java.exe to it to find the Java executable.
So it ends up with: C:\Program Files\Java\jre1.8.0_333\bin\bin\java.exe, which isn’t a valid path to java.exe. Perhaps you should edit your JAVA_HOME value?
In the meantime i faced this issue download another jdk of java (openjdk) (the env variable was correctly pointed on root folder bin not on executable) not sonarqube analize the sql scripts but seems the not recognize language, ita give me a lot of error kind this:
INFO: Sensor C# Project Type Information [csharp]
ERROR: String is not parsed (file project/Tables/Logs.sql, line 1)"
INFO: Sensor C# Project Type Information [csharp] (done) | time=121ms
^
INFO: Sensor C# Analysis Log [csharp]
2: [Id] INT IDENTITY (1, 1) NOT NULL,
ERROR: String is not parsed (file SqlScript/DBUpdate.sql, line 1)