public override SyntaxNode VisitAttribute(AttributeSyntax node) { var attributeSimpleName = node.GetSimpleName(); var obsoleteAttributeName = typeof(ObsoleteAttribute).Name; var assemblyTitleAttributeName = typeof(AssemblyTitleAttribute).Name; if (attributeSimpleName.StartsWith(obsoleteAttributeName) || attributeSimpleName.StartsWith(obsoleteAttributeName.Substring(0, obsoleteAttributeName.IndexOf("Attribute", StringComparison.Ordinal)))) { node = node.WithArgumentList(null); } if (attributeSimpleName.StartsWith(assemblyTitleAttributeName.Substring(0, assemblyTitleAttributeName.IndexOf("Attribute", StringComparison.Ordinal)))) { node = node.WithArgumentList(AttributeArgumentList(SeparatedList(new[] { AttributeArgument( LiteralExpression( SyntaxKind.StringLiteralExpression, Literal($"{_assembly.GetName().Name}.{MetadataClassSuffix}"))) }))); } return(base.VisitAttribute(node)); }