I originally started posting these individually, but there is a limit on the number you can post in a single day. Thus, consolidating them into a single post.
We just stood up a POC for Developer edition and ran Sonar scanner against 5 of our repositories. In total, 5,646 files were scanned and 399 of them failed to parse, due to the errors below.
Versions
- SonarQube Scanner: 3.2.0.1227
- Java: 1.8.0_151
- Linux: 4.15.0-1023-gcp
- Server Version: 7.5.0.20543
- SonarTSQL: 1.3.1.3067
Error
- Unable to parse file … Parse error at …
OPEN SYMMETRIC KEY
The parse error occurs at the K in KEY
Related statements that we also need to make sure parse are DECRYPTION BY CERTIFICATE and DECRYPTBYKEY()
MERGE
The parse error occurs at the M in MERGE
SET TRAN ISOLATION LEVEL
The parse error occurs at the T in TRAN
There are various levels than can follow this statement, for example READ UNCOMMITTED
ROWS UNBOUNDED PRECEDING
The parse error occurs at the R in ROWS.
This is part of a PARTITION BY statement, and can have many values following ROWS
GRANT EXECUTE ON TYPE::
The parse error occurs at the first :.
CREATE LOGIN [##MS_SQLEnableSystemAssemblyLoadingUser##] FROM ASYMMETRIC KEY [MS_SQLEnableSystemAssemblyLoadingKey]
The parse error occurs at the [ following KEY
ALTER SERVER ROLE
The parse error occurs at the S in SERVER
WHERE CONTAINS()
The parse error occurs at the C in CONTAINS.
This is part of the FULLTEXT feature
IF (UPDATE ()
The parse error occurs at the U in UPDATE.
This is part of an AFTER UPDATE trigger.
CREATE FULLTEXT INDEX ON
The parse error occurs at the F in FULLTEXT
CREATE FULLTEXT CATALOG
The parse error occurs at the F in FULLTEXT
LEFT JOIN FREETEXTTABLE
The parse error occurs at the F in FREETEXTTABLE
This is part of the FULLTEXT feature