-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Runtimelinkable-frameworkIssues associated with delivering a linker friendly frameworkIssues associated with delivering a linker friendly framework
Milestone
Description
This is in support of dotnet/linker#988 - see the spec there for motivation.
We need a way to selectively suppress warnings about linker-unfriendly patterns.
This attribute is largely inspired by SuppressMessageAttribute (that unfortunately cannot be used because it's marked [Conditional] under a condition that we wouldn't expect to enable when the linker runs).
namespace System.Runtime.CompilerServices
{
[AttributeUsage(
AttributeTargets.All,
Inherited = false,
AllowMultiple = true
)
]
public sealed class SuppressLinkerWarningAttribute : Attribute
{
public SuppressLinkerWarningAttribute(string category, string checkId)
{
Category = category;
CheckId = checkId;
}
public string Category { get; }
public string CheckId { get; }
public string? MessageId { get; set; }
public string? Justification { get; set; }
}
}Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Runtimelinkable-frameworkIssues associated with delivering a linker friendly frameworkIssues associated with delivering a linker friendly framework