tsqllint: INDEX UNIQUE NONCLUSTERED problem

hey,

this

-- simplified and shorten

IF OBJECT_ID(N'[dbo].[Test]', 'U') IS NULL
BEGIN
    CREATE TABLE [dbo].[Test](
        [Id] int IDENTITY(1,1) NOT NULL,
        [Name] nvarchar(255) NOT NULL,
     CONSTRAINT [PK_GlobalTest] PRIMARY KEY CLUSTERED ([Id] ASC),
     INDEX IX_GlobalNames_Name UNIQUE NONCLUSTERED ([Name]),
    )
END
GO

fails with

tsqllint -c .tsqllintrc test.sql test.sql(8,32): error invalid-syntax : Incorrect syntax near UNIQUE…

config file

{ “rules”: { “conditional-begin-end”: “off”, “cross-database-transaction”: “off”, “data-compression”: “off”, “data-type-length”: “off”, “disallow-cursors”: “off”, “full-text”: “off”, “information-schema”: “off”, “keyword-capitalization”: “off”, “linked-server”: “off”, “multi-table-alias”: “off”, “named-constraint”: “off”, “non-sargable”: “off”, “object-property”: “off”, “print-statement”: “off”, “schema-qualify”: “off”, “select-star”: “off”, “semicolon-termination”: “off”, “set-ansi”: “off”, “set-nocount”: “off”, “set-quoted-identifier”: “off”, “set-transaction-isolation-level”: “off”, “set-variable”: “off”, “upper-lower”: “off”, “unicode-string” : “off” }, “compatability-level”: 150 }

Any idea what is wrong? Thank you

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

Because it didn’t exist at the time we choose a package to use (2017). We can absolutely switch and will look into it, but you’re welcome to make a PR if you would like to see the switch in a specific timeline 👍