How can we help you today? How can we help you today?

SQL Code Analysis now available in Release Reports

SQL Change Automation v3.1 now includes static code analysis for SQL, which gives you advice on errors and best practices when deploying changes to a database. 

The new “SQL Code Issues” tab on the Release Report lists any issues and shows all the rules that were checked and passed for both SQL Source Control and SQL Change Automation projects. 


The SQL code analysis checks rules in the following categories: 

 For more information about the rules, see https://documentation.red-gate.com/codeanalysis.  

Code Analysis was introduced in SQL Prompt v9. This shows you any issues as you type in SSMS or VS.  This is shifted-left as far as possible to help catch issues before they are released. Having the static code analysis run at deployment time catches any issues not fixed at development time and gives DBAs additional confidence in the release scripts. If there are any issues, it will NOT fail a build or block a release. It’s additional information for the DBA to review. 

To get the latest version, update your SQL Change Automation PowerShell. If you are using the SQL Change Automation add-ons (Azure DevOps, TFS, Octopus Deploy, and more), then they’ll automatically get the latest PowerShell version if the release agent has internet access.  You should just see the new “SQL Code Issues” tab when you create your next release. 

If you want to control which rules run, see how on “Configuring the Code Analysis rules.” 

Please feel free to share this in blogs/tweets.  Or, even better, give it a try and let us know what you think. 

Thank you!

StephanieHerr
0

Add comment

Please sign in to leave a comment.