A small free .Net and JS library (with demo UI, command-line bulk formatter, SSMS/VS add-in, notepad++ plugin, winmerge plugin, and demo webpage) for reformatting and coloring T-SQL code to the user's preferences.
Ty to format some TSQL containing IF and THROW, you get this wrong result with unwanted indents
IF @persistence_name_suffix IS NULL THROW 51001
, '@persistence_name_suffix is null'
, 1;
IF @source_RepoObject_guid IS NULL
AND @persistence_RepoObject_guid IS NULL THROW 51002
, '@source_RepoObject_guid is null and @persistence_RepoObject_guid is null'
, 1;
IF NOT @persistence_RepoObject_guid IS NULL
AND @source_RepoObject_guid IS NULL
BEGIN
SELECT 1
END
Ty to format some TSQL containing IF and THROW, you get this wrong result with unwanted indents
this is the documentation for THROW https://docs.microsoft.com/de-de/sql/t-sql/language-elements/throw-transact-sql?view=sql-server-ver15
A line break before THROW would be fine