MicrosoftPremier / VstsExtensions

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

"Filter in" by "Warning Filters" or similar functionality #43

Closed koshdim closed 4 years ago

koshdim commented 4 years ago

I want to add to warning count some lines from build log that match my custom regexp. is this possible?

as far as I understand, "Warning Filters" only filter out what is already considered a warning, can I expand "consideration" rules?

for example, I want existence of a line like this WARNING in webpack performance recommendations: to be considered as a warning

ReneSchumacher commented 4 years ago

Hi @koshdim,

thanks for the feedback. As you already realized warning filters can only be used to specify a subset of warnings at the moment. I can see the value in your request, though. I've put your request in our backlog and I'll try to work on it this week.

René

koshdim commented 4 years ago

hi @ReneSchumacher,

that's awesome. I managed to achieve similar results with "Powershell" script task before "Check build quality". in case somebody else faces the same issue the code looks like this: `& npm run build *>&1 | ForEach-Object { if ($ -is [System.Management.Automation.ErrorRecord]) { $messageString = $.Exception.Message } else { $messageString = $_.ToString() }

$warningPattern = "WARNING .+:"
if ($messageString -match $warningPattern) {
    Write-Host  "##vso[task.LogIssue type=warning;] $_"
}

} $LASTEXITCODE = 0`

but this has disadvantage of running build command one more time within this script, so I'm still looking for improvement of "Check build quality" task

ReneSchumacher commented 4 years ago

Hi again,

I've implemented the feature you suggested and it is on its way into our release pipeline (waiting for PR approval from a colleague). The new version should be out today; just keep an eye on the marketplace. Please let me know if it meets your needs.

Happy building! René

ReneSchumacher commented 4 years ago

@koshdim The new version is available now. I'm closing this issue now, but please feel free to comment again, if you run into any issues or have additional feedback.

René