rr-wfm / MSBuild.Sdk.SqlProj

An MSBuild SDK that provides similar functionality to SQL Server Data Tools (.sqlproj) projects
MIT License
379 stars 42 forks source link

Enable marking individual static analyzer rules as error (instead of warning) #522

Closed ErikEJ closed 4 months ago

ErikEJ commented 4 months ago

I investigated the effect of TreatwarningsAsErrors - it has no effect on .sqlproj - the only way to make a analyzer problem an error is to mark it explicitly:

<RunSqlCodeAnalysis>True</RunSqlCodeAnalysis> 
<SqlCodeAnalysisRules>+!Microsoft.Rules.Data.SR0001;+!Microsoft.Rules.Data.SR0008</SqlCodeAnalysisRules>