dotnet/roslyn
GitHub で見るIDE0060 (Remove unused parameter) false positive for interpolated string handler argument
Open
#76,578 opened on 2024年12月29日
Area-IDEBugFeature - IDE0060help wanted
Repository metrics
- Stars
- (20,414 stars)
- PR merge metrics
- (平均マージ 6d 17h) (30d で 256 merged PRs)
説明
Version Used:
VS 17.13 Preview 1
Steps to Reproduce:
public static void M(bool x, [InterpolatedStringHandlerArgument(nameof(x))] ref MyInterpolatedStringHandler y)
{
// Do something with message. Analyzer will complain that `x` parameter isn't used. But it's actually used as the value will be passed to `MyInterpolatedStringHandler`
}
Diagnostic Id: IDE0060 (Remove unused parameter)
Expected Behavior:
No diagnostic
Actual Behavior:
False positive diagnostic