MicrosoftPremier / VstsExtensions

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

Filewarnings without baseline results in zero warnings instead of skipping #100

Closed gerwinjansen closed 4 years ago

gerwinjansen commented 4 years ago

... so the build fails because the current build has more warnings than the previous (erroneous) zero.

Steps to reproduce

  1. Have a master branch with a C# project with 1 compiler warning, and a file with 1 warning.
  2. Configure BQC as this (change the regex according to your own file):

    - task: BuildQualityChecks@7
    inputs:
        checkWarnings: true
        showStatistics: true
        evaluateFileWarnings: true
        warningFiles: 'modelchecker.csv'
        warningFileFilters: '/(?<object>^\w+,[\w\.]*,[\w\.]+?),(?<category>\w+,\w+?),(?<message>[^,]+ ?)/'
        warningFilesArtifact: 'modelcheckerwarnings'
        includePartiallySucceeded: false
  3. Run a build on master, use BQC.ForceNewBaseline=true as needed
  4. Create a new branch from master
  5. Run a build on the new branch

Actual result

The build fails: [ERROR] The number of warnings (2) has increased since the previous build! The previous build had 0 warning(s).

Expected result

[WARNING] The baseline build could not be found. All policies based on the previous build will pass.

Debug log

with System.Debug=true and BQC.LogRawData=true: Rawlog.txt

ReneSchumacher commented 4 years ago

Hi Gerwin,

thanks for reporting this. This is indeed a bug in the task. We'll fix that with the next version (most probably this week).

Thanks, René

ReneSchumacher commented 4 years ago

Hi again,

the issue is fixed with v7.2.1 which is going live right now.

Happy building and keep up the very good feedback! Thanks a lot for that!

René