SQL Enlight
Code Quality
extension for Azure DevOps and TFS 2017/2018
extension for Azure DevOps and TFS 2017/2018
SQL Enlight Code Quality extension for Azure DevOps consists of build task can be added to the build definition. The task analyses T-SQL code against best practices and its output can be easily combined with the build test results.
The build task uses more than 230 standard analysis rules, which to ensure code quality, detect potential defects, and check against best practices.
SQL Enlight supports the creation of custom rules, which can be also used by the Azure DevOps extension.
The SQL Enlight Code Quality extension is now in preview and is available for install in Visual Studio Marketplace.
The SQL Enlight Code Analysis Task works together with the Publish Test Results task in order to combine code analysis results with the Test Results.
1. Find and add SQL Enlight Code Analysis build task.
1. Add the Publish Test Results task after the SQL Enlight build task
All the SQL Enlight Code Analysis settings are optional and are grouped into two categories – General and Advanced.
Include Pattern
Optional regex pattern for matching.SQL files, which to be analyzed. The pattern can be used to limit the analyzed files to a specific folder.
Exclude Pattern
Optional regex pattern for matching.SQL files, which to be excluded during the analysis. The pattern can be used to exclude specific folders or files from the analysis.
Include Rules
Optional comma-separated list of rules or analysis groups which to be enabled during the analysis.
By default, all active rules will be included.
Exclude Rules
Optional comma-separated list of rules or analysis groups which to be disabled during the analysis.
By default, there won’t be any excluded rules.
Fail On Violation
The setting controls the build outcome in case any rule violations are found. It can be used to fail the build in case any analysis rule is violated.
Analysis Context
Optional analysis context file.
Connection String
An optional SQL connection string, which to be used for loading analysis context.
Report Output
Optional output file for the generated report.
Custom Properties
Optional custom properties, which to be provided to the generated report.
Analysis Template
An optional analysis template file, which to be used for the analysis.
In order for the SQL Enlight results to be combined with the test results, the following settings have to be made:
The Log tab shows all results and whether the Code Analysis task has failed.
If the Code Analysis task has failed, the Tests tab will contain a tree node SQL Enlight analysis results.
All rule violations, which have severity Werning or Error are treated as errors and will appear in the Test Results.
Opening each error will show details about the error and the file and line at which the error violation appeared.
SQL Enlight Code Quality extension does not collect any data or send any data outside your Azure DevOps project space.
We will never give away, sell, rent, or lease any information you provide to any third party. We respect your privacy and take protecting it seriously.