It may happen that you have a need to check the scripts that you have on your disk. For example, it may be part of your build process.
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask AssemblyFile="SQLCodeGuard.MSBuild.dll" TaskName="SQLCodeGuard.MSBuild.CheckTSQL" />
<PropertyGroup>
<OutputPath>c:\temp</OutputPath>
</PropertyGroup>
<Target Name="Release">
<CheckTSQL SourcePath="d:\Projects\SqlScripts" IncludeIssue="ALL;CGUNP" ExcludeIssue ="DEP023" OutFile="result.xml" Quiet ="true"/>
</Target>
</Project>
After execution you can inspect out file result.xml
<root>
<file fullname="d:\Projects\SqlScripts\dbo.uspGetBillOfMaterials.StoredProcedure.sql" name="dbo.uspGetBillOfMaterials.StoredProcedure.sql">
<issue code="DEP013" line="1" column="5" text="Deprecated SET options" message="ANSI_NULLS"/>
<issue code="MI003" line="26" column="133" text="Unqualified column name" message="RecursionLevel"/>
</file>
</root>
It's simple, isn't it?