Skip to content

Commit 5627049

Browse files
authored
don't emit attribute added diagnostic in strict mode (#28243)
1 parent 1a58184 commit 5627049

File tree

2 files changed

+546
-22
lines changed

2 files changed

+546
-22
lines changed

src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/AttributesMustMatch.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ private void AddDifference(IList<CompatDifference> differences, DifferenceType d
6262
return;
6363
}
6464

65+
if (!_settings.StrictMode && dt == DifferenceType.Added)
66+
{
67+
return;
68+
}
69+
6570
CompatDifference difference = dt switch
6671
{
6772
DifferenceType.Changed => new CompatDifference(

0 commit comments

Comments
 (0)