SQL Code Analysis

How do I configure SQL Code Guard with VS as an add-in or a check-in policy?

How do I use SQL Code Guard with VS, either as an add-in or a check-in policy?

Place the SQL Code Guard settings file (sqlcodeguard.settings or sqlcodeguard.xml) in the root folder of your project. If you use a TFS check-in policy, don’t forget to add the settings file to your TFS project.

If you have multiple settings files with one per folder, the nearest one will be used. If no settings file is found in the same directory as the script file being analyzed, the directory structure will be traversed up to its root. If a settings file is still not found, the default settings will be used.

I can’t find the SQL Code Guard check-in policy in VS and have no idea how to use it

After installing SQL Code Guard you should manually register the check-in policy by running devenv/setup. It may also be useful to read this Microsoft article on adding check-in policies for TFS, and this post from the SQL Code Guard blog.

How do I create or edit a SQL Code Guard settings file used with a TFS check-in policy or VS add-in?

Use the Settings Editor, SqlCodeGuard.SettingsEditor.exe, which can be found in the SQL Code Guard installation folder. The correct format is SqlCodeGuard.SettingsEditor.exe <path to settings file>, and if you specify a file that doesn’t exist, a new one will be created.

 


Didn't find what you were looking for?