Enabling/disabling Code Analysis rules
Published 29 October 2019
As you write your code, Code Analysis checks your SQL against a set of rules. Any violations of these rules produce issues that are underlined with green squiggles.
You can customise Code Analysis by disabling the rules you do not find useful to reduce the amount of issues in your script.
Enabling/disabling from Issue Details
If you want to disable the rule responsible for the currently displayed issue, click the blue light bulb icon next to the issue to display Issue Details. Then click Disable rule.
After you disable a rule, you will see a red icon next to its name and the link will change to Enable rule. Click Enable rule to turn the rule back on.
If Issue Details disappear and you want to enable a disabled rule, go the the list of issues by selecting Manage Code Analysis Rules... from the Prompt menu. You will see the Code Analysis rules dialog. Find the rule you are interested it and check it back on.
Enabling/disabling from Manage Code Analysis Rules
To see the list of all issues and be able to enable/disable them one by one, go to the Prompt menu and select Manage Code Analysis Rules...
Tick an issue to enable it and untick it to disable it. Then save your settings in the current location by clicking Save. If you would like to change the location of your settings, click Save as.... In the dialog, select a new location and click Save.
Clicking on individual rules will show a description and provide a link to online documentation where you can discover more information: