SQL Prompt 10

Working with SQL Code Analysis (Quick Ref)

As you review a script, or write code, SQL Prompt will run the static code analysis in the background, parsing the code and checking the syntax for compliance with its built-in set of rules. If code flouts a rule, you'll see it denoted with a 'wavy' green underline’, in SSMS. If you click on it, you'll see a 'lightbulb' symbol in the left margin, which is usually blue but will be orange if it's an issue Prompt can "auto-fix".

Click on the lightbulb to see the Issue Details box, describing the rule, and potential problems causes by code that doesn't adhere to it and often a link through to a technical article suggesting ways to deal with the issue.

  • Enable or disable Code Analysis from the SQL Prompt menu
  • Control which rules to run on your code using Manage code analysis rules on the SQL Prompt menu. You can also disable individual rules from Issue Details.
  • See a list of issues for a script using Show List… from the SQL Prompt menu.

Code analysis Keyboard Shortcuts

Action

Shortcut

Toggle Code Analysis On/OffCtrl+Shift+A

Opens issue details
(cursor must be in the green squiggling area)

Ctrl

Didn't find what you were looking for?