How to: Enable and Disable Specific Rules for Static Analysis of Database Code
You can more easily identify design and performance issues in your database by running specific rules as part of static analysis for database code. For example, you can run rules that are likely to identify common problems after every build and then run all rules before the end of a development milestone. You can also specify different sets of rules for different build configurations.
To enable or disable specific rules for static analysis of database code
Open the solution that contains the database project for which you want to enable or disable specific rules.
In Solution Explorer, click the database project.
On the Data menu, point to Static Code Analysis, and click Configure.
The project properties window opens, displaying the Code Analysis tab.
In the Configuration list, click the configuration for which you want to enable or disable specific rules.
To enable a rule, select the check box for that rule.
To disable a rule, clear the check box for that rule.
To treat each violation of a rule as an error instead of a warning, select the Treat Warning as Error check box.
Note
You can select or clear the check box for a group of rules (Design, Naming, or Performance) to enable or disable all rules in that group. You can also select or clear the Treat Warning as Error check box for a group of rules. To enable, disable, or treat as errors most rules in a group, you can select or clear the check box for the group and then select or clear check boxes for specific rules.
See Also
Tasks
How to: Enable and Disable Static Analysis for Database Code
How to: Analyze Transact-SQL Code to Find Defects
Walkthrough: Analyze Transact-SQL Code for an Existing Database