dotnet / dotnet/msbuild

Proposal: Add CustomIgnoreRegularExpression to Exec Task

Open
#7,970 1 comment 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

Similar to `CustomWarningRegularExpression`, there are opposite use-cases which require filtering out a specific error/warning on stderr. While `IgnoreStandardErrorWarningFormat=true` prevents all errors and warnings from being emitted on stderr, the proposed `CustomIgnoreRegularExpression=pattern` will prevent the specific patterns, when `IgnoreStandardErrorWarningFormat` is `false`.

i.e. the `else if` on line 399 https://github.com/dotnet/msbuild/blob/3ade6423189769545ddff2ffeeed37010ec57f4d/src/Tasks/Exec.cs#L395-L404

to be ` else if (IgnoreStandardErrorWarningFormat || OutputMatchesRegex(singleLine, ref _customIgnoreRegex)) `, so that if the stderr message matches the pattern, it is printed on stdout regardless of `IgnoreStandardErrorWarningFormat`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.