Replies: 1 comment 5 replies
-
Hi @chrispoch, thanks for bringing that up. Currently, there is no good solution to define exceptions. My recommendation would be using the C# preprocessor statements (#pragma) inside the code to just ignore the warning (see https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/preprocessor-directives#pragmas). That makes most sense if you explicitly decide not to get rid of a specific warning. Apart from that, I believe we will need to add a new feature to the task to support exclusion of warnings. Perhaps that would be a good idea for a new major version with which we can make filters more explicit. I'm not sure how quickly we can add this, though, as I am currently the only one working on the extension and I'm pretty busy running customer workshops. :-( |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm running Build Quality Checks against an enterprise application that historically had a lot of warnings. I've cleaned it up a bit, but I have three warning types that won't go away anytime soon. I'd like to fail the build on any other type of warning introduced. Unfortunately since we don't build clean every run, the number of errors fluctuates, typically between 2 and 11. Almost any change triggers two errors of MSB3276 and a change that involves one of the other projects triggers 9 errors of types SQL71005 and SQL70588.
What I'd like to do is fail the build any time another type of warning is introduced but permit the three that are known issues. I've tried with warning filters, but I believe it's looking for warnings to include instead of warnings to exclude. I've tried regexes that seem to work on my test data for either direction, but none of them are causing my builds to pass if no new warnings and fail if new warnings are added.
Any suggestions for how to make it do what I want?
Regex for warnings to exclude:
/.*(SQL71005)|(MSB3276)|(SQL70588)+./g
Regex for warnings to include:
/^((?!(SQL71005)|(MSB3276)|(SQL70588)).)*$/gm
Beta Was this translation helpful? Give feedback.
All reactions