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.
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.
Went to use this today, it shows as being there, but doesn't work. Not sure it should be a request to add it so much as a bug report that it doesn't work.
Similar to
CustomWarningRegularExpression
, there are opposite use-cases which require filtering out a specific error/warning on stderr. WhileIgnoreStandardErrorWarningFormat=true
prevents all errors and warnings from being emitted on stderr, the proposedCustomIgnoreRegularExpression=pattern
will prevent the specific patterns, whenIgnoreStandardErrorWarningFormat
isfalse
.i.e. the
else if
on line 399 https://github.com/dotnet/msbuild/blob/3ade6423189769545ddff2ffeeed37010ec57f4d/src/Tasks/Exec.cs#L395-L404to be
else if (IgnoreStandardErrorWarningFormat || OutputMatchesRegex(singleLine, ref _customIgnoreRegex))
, so that if the stderr message matches the pattern, it is printed on stdout regardless ofIgnoreStandardErrorWarningFormat
.