MicrosoftPremier / VstsExtensions

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

Warnings not shown #213

Closed merdandurmus closed 1 year ago

merdandurmus commented 1 year ago

Hi,

I am using ESLint for my project and I want my pipeline to fail when there are any warnings/errors in the code. The warnings are shown in the log, however my pipeline does not fail.

My task is attached below:

- task: BuildQualityChecks@8
  inputs:
    checkWarnings: true
    warningFailOption: 'fixed'
    warningThreshold: '0'
    showStatistics: true

When using this task I get the following warning:

[WARNING] The specified task filters did not match any build task.
##[warning]The specified task filters did not match any build task.

I have attached the logs and the full YAML logs_54.zip YAML_file.zip

ReneSchumacher commented 1 year ago

Hi @merdandurmus,

our task does not know the ESLint task by default, and that's why you see the warning. If you pipeline only contains the ESLint task (at least the one you uploaded does), you can add the warningTaskFilters parameter like this:

- task: BuildQualityChecks@8
  displayName: 'Check build quality'
  inputs:
    checkWarnings: true
    warningFailOption: fixed
    warningThreshold: '0'
    showStatistics: true
    warningTaskFilters: '/^Run ESLint$/i'

This should correctly count the warnings.

ReneSchumacher commented 1 year ago

Hi @merdandurmus,

did my suggestion fix your issue? Since I assume it did, I'll close this issue by the end of the week, unless I hear different feedback from you.