ErikEJ / erikej.github.io

ErikEJ blog
3 stars 1 forks source link

How to: Code analyze your SQL Server T-SQL scripts in Visual Studio #55

Open utterances-bot opened 1 month ago

utterances-bot commented 1 month ago

How to: Code analyze your SQL Server T-SQL scripts in Visual Studio | ErikEJ's blog

Maybe you already take advantage of the C# code analyzers built into the .NET SDK, that help you improve code consistency, quality, security and avoid common mistakes and potential bugs.

https://erikej.github.io/dacfx/codeanalysis/sqlserver/2024/04/02/dacfx-codeanalysis.html

stetou commented 1 month ago

Do you have an example of this ? "But did you know that is is also possible to run analyzer rules against your SQL Server T-SQL object definitions (DDL)"

Let say I want to make sure that

I would do that in a unit test in visual studio But, Is it something that can be done using a static code analysis ?

ErikEJ commented 1 month ago

Have a look at the SqlServer.Rules fork that I maintain