• Microsoft has added "Static Code Analysis" to Visual Studio 2013 - SQL Server Data Tools (SSDT).

    See attachment.

    For example you have rules to avoid SELECT * in stored procs or deprecated syntax.

    There are rules for data type compatibility and avoiding non-SARG-able WHERE clauses.

    For some reason they have rule #7 that wants you to use WHERE ISNULL(column, default value) which is just plain wrong and would cause a table scan.

    It is a pity that you cannot dismiss individual warnings as you reviewed them. That would make it really useful for quality management, as you could either fix the issue or review and dismiss it. Without this, the tool always produces a lot of noise which may hide important issues.

    Also, it's a pity you cannot export the results into a report.

    But overall, it is a step in the right direction.