Closed Bouke closed 3 years ago
Maybe the new filter regex with named capture groups is required and the old regex no longer works? I've changed my regex to the following, which now match the first three log entries:
warningFilters: '/D:\\a\\1\\s\\(?<filename>.+?)\((?<line>\d+),(?<column>\d+)\): (warning|error) (?<identifier>[^ ]+) : (?<message>.+)$/'
Note that the fourth and fifth errors aren't matched by this, but that's not a concern anymore as I'm reformatting the output using python so that it matches the regex.
Hi @Bouke,
sorry for the late response. I'm currently busy delivering customer workshops but will look into your issues after I'm done with the workshop today. The new capturing group feature is most likely the root cause for this, but I'll have to check to be 100% sure. You could either use a non-capturing group in your original filter (i.e., /(?:warning|error)/
) or switch to named capturing groups as you did. The latter is preferred as it also supports warning statistics for custom warning filters.
René
Hi again,
I have looked at the differences between v6.4.4 and v7.6.2 and I am still not sure why it stopped working. Version 6.4.4 already had the feature that a capturing group was used to find the total number of warnings in a log. Thus, if warnings weren't properly reported but you had a summary log message like "Total warnings: xyz", you could extract that xyz with a capturing group and we would simply add that number to the overall number of warnings. If the group captured any non-numeric value, the task should basically ignore it.
Having said that, while this feature is still available in v7.6.2, I'd still recommend using properly named capturing groups to support warning statistics or - if you don't need statistics - switch to a non-capturing group. Both resolves the issue. Let me know if you need anything else.
I'm closing this issue since I believe it is resolved by changing the regular expression.
I'm running a linter (eslint) task as part of my build. This linter produces output like this:
I want to verify the lint issue count against the baseline, to ensure no new issues are introduced. The count is determined by counting the occurrences of the words "error" or "warning". This used to work fine with version 6, but version 7 is reporting 0 issues.
This is the output from both tasks:
Any help would be appreciated.