Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/config/globalconfigs/Common.globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dotnet_diagnostic.CA1067.severity = warning
dotnet_diagnostic.CA1068.severity = warning
dotnet_diagnostic.CA1200.severity = warning
dotnet_diagnostic.CA1821.severity = warning
dotnet_diagnostic.CA1865.severity = warning
dotnet_diagnostic.CA1868.severity = warning
Comment thread
333fred marked this conversation as resolved.
dotnet_diagnostic.CA2009.severity = warning

# CA2012: Use ValueTasks correctly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,14 +330,10 @@ private void ParseXmlAttributes(ref XmlNameSyntax elementName, SyntaxListBuilder
{
var attr = this.ParseXmlAttribute(elementName);
string attrName = attr.Name.ToString();
if (_attributesSeen.Contains(attrName))
if (!_attributesSeen.Add(attrName))
{
attr = this.WithXmlParseError(attr, XmlParseErrorCode.XML_DuplicateAttribute, attrName);
}
else
{
_attributesSeen.Add(attrName);
}

attrs.Add(attr);
}
Expand Down