sqlfluff icon indicating copy to clipboard operation
sqlfluff copied to clipboard

Remove empty batches

Open fmms opened this issue 3 years ago • 1 comments

Search before asking

  • [X] I searched the issues and found no similar issues.

Description

I have the following t-sql Code:

CREATE TABLE dbo.test (
    testcol1 INT NOT NULL,
    testcol2 INT NOT NULL,
);

GO



GO



CREATE NONCLUSTERED INDEX dbo_index
    ON dbo.test(testcol1 ASC);

Code like this often exists in Microsoft SQL Server projects as the tool for database change deployment SSDT introduces them sometimes on schema compare....

I want to remove batches that do not even have a single SQL command in them.

Use case

No response

Dialect

tsql

Are you willing to work on and submit a PR to address the issue?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

fmms avatar Jun 30 '22 10:06 fmms

Related to #2634

tunetheweb avatar Jun 30 '22 10:06 tunetheweb