{"id":6810,"date":"2026-03-23T20:30:13","date_gmt":"2026-03-24T03:30:13","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/azure-sql\/?p=6810"},"modified":"2026-03-25T12:05:16","modified_gmt":"2026-03-25T19:05:16","slug":"sql-code-analysis-in-vs-code-configure-rules-without-editing-your-project-file","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/azure-sql\/sql-code-analysis-in-vs-code-configure-rules-without-editing-your-project-file\/","title":{"rendered":"SQL code analysis in VS Code: Configure rules without editing your project file"},"content":{"rendered":"<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">SQL code analysis has been part of the SSDT workflow for a long time. Before deploying a schema change, you could run a set of static analysis rules against your project to catch potential issues, things like missing primary keys, deprecated syntax, or objects that could break under certain compatibility levels. It was one of those SSDT features that teams quietly relied on without thinking much about it.<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">When developers started moving their SQL Database Projects workflow to VS Code, code analysis came with them. But configuring which rules to enable or disable required editing the <code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">.sqlproj<\/code> file directly, not a deal breaker, but not exactly intuitive either.<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">That changes with the March 2026 release of the SQL Database Projects extension for VS Code.<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\"><strong>Code Analysis Settings Dialog<\/strong><\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">The SQL Database Projects extension now includes a settings dialog to configure code analysis rules without touching the <code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">.sqlproj<\/code> file.<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">To open it: right-click your project in the <strong>Database Projects<\/strong> view \u2192 <strong>Code Analysis Settings<\/strong>.<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">From the dialog you can:<\/p>\n<ul class=\"[li_&amp;]:mb-0 [li_&amp;]:mt-1 [li_&amp;]:gap-1 [&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3\">\n<li class=\"whitespace-normal break-words pl-2\"><strong>Enable or disable code analysis on build<\/strong> \u2014 a toggle at the top controls whether analysis runs as part of your build at all<\/li>\n<li class=\"whitespace-normal break-words pl-2\"><strong>Enable or disable rule categories<\/strong> \u2014 rules are grouped by category (Design, Naming, Performance); you can toggle an entire category at once<\/li>\n<li class=\"whitespace-normal break-words pl-2\"><strong>Change rule severity<\/strong> \u2014 set individual rules to <strong>Warning<\/strong>, <strong>Error<\/strong>, or <strong>None<\/strong><\/li>\n<li class=\"whitespace-normal break-words pl-2\"><strong>Search for a rule<\/strong> using the search bar<\/li>\n<li class=\"whitespace-normal break-words pl-2\"><strong>Filter by severity<\/strong> to quickly see which rules are configured as errors vs. warnings<\/li>\n<\/ul>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">Select <strong>OK<\/strong> to save your changes and close the dialog, or <strong>Apply<\/strong> to save without closing. Select <strong>Reset<\/strong> to revert to defaults.<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\"><strong>Why this matters<\/strong><\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">For teams migrating from SSDT, this closes a usability gap. In Visual Studio, code analysis settings lived in a properties pane \u2014 something you could find and change without knowing the underlying XML. That same experience is now in VS Code.<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">For teams already working in VS Code, it&#8217;s one less reason to dig into the project file for routine configuration.<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">Code analysis works with SQL Database Projects targeting SQL Server, Azure SQL, and Azure SQL Database. If your project targets Fabric SQL database, the same rules apply.<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\"><strong>Get started<\/strong><\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">Install or update the <a class=\"underline underline underline-offset-2 decoration-1 decoration-current\/40 hover:decoration-current focus:decoration-current\" href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-mssql.sql-database-projects-vscode\">SQL Database Projects extension for VS Code<\/a>. Code analysis is available for any existing <code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">.sqlproj<\/code> , no migration or project changes needed.<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">Share feedback or file issues at <a class=\"underline underline underline-offset-2 decoration-1 decoration-current\/40 hover:decoration-current focus:decoration-current\" href=\"https:\/\/github.com\/microsoft\/vscode-mssql\/issues\">microsoft\/vscode-mssql<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SQL code analysis has been part of the SSDT workflow for a long time. Before deploying a schema change, you could run a set of static analysis rules against your project to catch potential issues, things like missing primary keys, deprecated syntax, or objects that could break under certain compatibility levels. It was one of [&hellip;]<\/p>\n","protected":false},"author":202171,"featured_media":6816,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,668,625],"tags":[529,725,704,724,558],"class_list":["post-6810","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-sql","category-sql-database-in-fabric","category-vs-code","tag-azure-sql","tag-developer-tools","tag-sql-database-projects","tag-ssdt","tag-vs-code"],"acf":[],"blog_post_summary":"<p>SQL code analysis has been part of the SSDT workflow for a long time. Before deploying a schema change, you could run a set of static analysis rules against your project to catch potential issues, things like missing primary keys, deprecated syntax, or objects that could break under certain compatibility levels. It was one of [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/posts\/6810","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/users\/202171"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/comments?post=6810"}],"version-history":[{"count":1,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/posts\/6810\/revisions"}],"predecessor-version":[{"id":6812,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/posts\/6810\/revisions\/6812"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/media\/6816"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/media?parent=6810"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/categories?post=6810"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/tags?post=6810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}