Hi,
We have a Developer Edition of SonarQube 10.3 and use it for .NET projects, but I don’t think that matters for the question…
We have some key logic in stored procedures on MS SQL Server. Lots of them (dozens) use perfectly correct T-SQL code:
trim('%' from @percentNumberWithPercentSign)
But it is not supported for scanning by Sonar.
As a result T-SQL Sensor fail to scan the T-SQL file. So entire file - dozens, hunderds of T-SQL lines - are not scanned. That affects every T-SQL file that use that expression. It’s a warning in the build log:
build 06-Feb-2024 09:26:59 WARN: Unable to parse file 'Something.sql' : Parse error at line 269 column 111:
build 06-Feb-2024 09:26:59 269: declare @someVar decimal(5,2) = CONVERT(decimal(5,2), trim('%' from @percentNumberWithPercentSign))/100
build 06-Feb-2024 09:26:59 ^
Is improvement of T-SQL support on your todo list for foreseeable future?
Kind regards,
Michal Gruda