MicrosoftPremier / VstsExtensions

Documentation and issue tracking for Microsoft Premier Services Visual Studio Team Services Extensions
MIT License
59 stars 14 forks source link

dotnet core build task warnings not caught #98

Closed bdn-mca closed 4 years ago

bdn-mca commented 4 years ago

We are using "dotnet core build" step with fxcop analyzers for code analysis. Since we introduced the fxcop analyzers at a later stage, we had around 1000 warnings suppressed in a global suppression file, and agreed to have 0 warnings from this point on.

In the CI, "Check build quality" always reports 0 warnings, even if the dotnet build step beforehand reports a warning. Warning threshold is set to 0, and dotnet is added to task filters (as you can see from the task output) Now, I read about the workaround of using MSBuild instead of dotnet build. However, MSBuild does not take global suppressions files into account, and reports 1000 warnings - and "Check build quality" duly fails the build in that case.

Any advice?

image

image

woehrl01 commented 4 years ago

Hi!

This probably sounds like a configuration related issue. Could you please send us the log of the specific build to psgerextsupport@microsoft.com, so we can have a deeper look into the applied configuration?

Best

bdn-mca commented 4 years ago

The issue is with the dotnet build task - it does not report the warnings in the build summary, and "Check build quality" cannot catch any warnings. It will be like this until an update is applied, as per this comment.

As a workaround, adding this as "Warning Filters (Tasks)" in the "Check build quality" task fails the build if there are warnings over the threshold: /\s([1-9]\d*[0]*)\s+warning\(s\)/i