[TSQL] Unable to parse Schema creation file

When analysing a SQL Server project, I encounters an warning when trying to parse a file containing the creation of a schema.

  • versions used:
    • SonarQube: 6.7.4 (build 38452)
    • Plugin SonarTSQL: 1.2 (build 2539)
  • error observed:
WARNING: WARN: Unable to parse file 'C:/src/SqlProject/Ref/Ref.sql' : Parse error at line 2 column 19:

1: CREATE SCHEMA [Ref]
2: AUTHORIZATION [dbo];
^
3:
  • steps to reproduce: create a new SQL Server Project in Visual Studio, and analyze it.
  • potential workaround: none ?

Hi,

Indeed, there’s a bug in our parser: it doesn’t accept a delimited identifier (between brackets) after AUTHORIZATION.
We will fix that: SONARTSQL-134

Thanks for the feedback!

Pierre-Yves