dotnet/roslyn

'Add argument name' refactoring works only at very beginning of attribute argument

Open

#63,365 opened on Aug 12, 2022

View on GitHub
 (3 comments) (0 reactions) (0 assignees)C# (4,257 forks)batch import
Area-AnalyzersBughelp wanted

Repository metrics

Stars
 (20,414 stars)
PR merge metrics
 (Avg merge 6d 17h) (256 merged PRs in 30d)

Description

Invoke lightbulb on the four locations indicated by $$

[My($$nu$$ll, null)]
class MyAttribute : System.Attribute
{
    public MyAttribute(string x, string y) { _ = new MyAttribute($$nu$$ll, null); }
}

Only 3 locations shows the refactoring. The one that doesn't work is invoking from middle of attribute argument.

Contributor guide