We are using Sonar Server, Developer Edition. When the scan is running, we are seeing thousands of Warnings that read “Unable to fully parse: Parse error starting from line .” These are almost always occurring in .sql files, and on lines with the following keywords: BEGIN, CREATE, DECLARE.
When this happens, is the scanner just skipping those lines, or larger pieces of the file? The former is fine, but if we’re losing entire IF and TRY blocks, that makes the scan much less valuable to us.
I got help with this form Sonar support. The default setting for .sql files, is to treat these as PL/SQL, while ours were MS SQL. This can be changed in the generated SonarQube web application, under Administration → Languages. The scanner does not automatically distinguish between the two, and will break if you add .sql as a valid extension to both MS SQL and PL/SQL.
I did not determine whether the parse warnings were skipping individual lines or entire blocks of code, but this setting solves the problem.