dotnet / roslyn-analyzers

MIT License
1.55k stars 460 forks source link

Simplify message for CA1303 #7331

Open guffab opened 3 weeks ago

guffab commented 3 weeks ago

Analyzer

Diagnostic ID: CA1303

Describe the improvement

Currently, a violation of this rule looks like this: image

And this is the message I am getting: image

Although the message perfectly explains what is wrong, I just find it a bit convoluted given that most of the information is already available in the editor.

Describe suggestions on how to achieve the rule

I would simplify it to:

"A literal string is passed to *parameter name* of *object/method name*, which expects a localized string. Retrieve it from a resource table instead."