A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/tcartwright/SqlServer.Rules below:

tcartwright/SqlServer.Rules: SQL Server static code analysis rules for SSDT database projects

Yet Another Rule-set for SQL Server DataTools

Just what it says on the box: A library of SQL best practices as extended database code analysis rules checked at build. The rules can be installed locally as well as on the build server.

For a complete list of the current rules we have implemented see here. For example code see here

  1. Ensure SqlServer.Rules.SolutionGenerator is "Set as Startup Project"
  2. Set Command line arguments:
    1. Open up the properties for the SqlServer.Rules.SolutionGenerator project
    2. Select the Debug tab
    3. Enter one of the following scenarios:
    4. To debug the test harness db: --build --reportDirectory ".\Files" --solution "..\..\..\TestDatabase\TestDatabase.sln"
    5. To debug a Sql project: --build --reportDirectory ".\Files" --solution "{path}.sln"
  3. Add a break point in the SqlServer.Rules project in any of the rules you wish to debug

Note: if you need to debug the loading of the library see here

An Install.bat is provided that will copy out the rules to all of the appropriate folder destinations. Or you can optionally follow these instructions:

Follow the instructions on MS Docs Install Static Code Analysis Rule.

The build should be installed to the template path %VSBIN%\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\{SqlEngine}\Extensions So for Visual Studio 2017 with DAC version 150 the path might be

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\150\Extensions\SqlServer.Rules

NOTES:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4