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 analyzer build warnings as errors to be based on a wildcard #546

Closed ErikEJ closed 3 months ago

ErikEJ commented 3 months ago

for example: +!SqlServer.Rules.* or +!SqlServer.Rules.SRN*

cjakobsen commented 3 months ago

Could even expand this to generally change severity to something else like information or suggestion

ErikEJ commented 3 months ago

@cjakobsen Suggestion for the format? (I have not heard of suggestion as a level)

cjakobsen commented 3 months ago

Format could be something like +!SqlServer.Rules.*=suggestion.

Reference: Configuration options for code analysis - Severity

ErikEJ commented 3 months ago

Only warning and error is supported, unfortunately:

https://learn.microsoft.com/it-ch/dotnet/api/microsoft.sqlserver.dac.codeanalysis.sqlruleproblemseverity?view=sql-dacfx-161

https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-diagnostic-format-for-tasks?view=vs-2022

ErikEJ commented 3 months ago

@cjakobsen PR here: https://github.com/rr-wfm/MSBuild.Sdk.SqlProj/pull/547