Open kendrahavens opened 5 years ago
This is a great idea.
This can be done by users writing their own analyzer.
Yes I can also write my own operating system, or my own IDE or runtime environment. But if you want a customer like me to like your product more you will add this feature.
On Sat, Sep 7, 2019 at 12:56 AM CyrusNajmabadi notifications@github.com wrote:
This can be done by users writing their own analyzer.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dotnet/roslyn/issues/38531?email_source=notifications&email_token=ACSL73ELE7TAHGOEF2L7OBLQILNZDA5CNFSM4IUDS7O2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6EIEAY#issuecomment-529039875, or mute the thread https://github.com/notifications/unsubscribe-auth/ACSL73BLDCVTMJTLCQ7ACADQILNZDANCNFSM4IUDS7OQ .
@markus27183 i'd be happy to walk you through creating such an analyzer. With that info you could then add additional analyzers in the future if you run into more stuff you want to check for (or you can change this particular analyzer if you run into cases you don't want it to trigger on).
LMK!
Design review conclusion: We aren't sure what the "right" approach here is, so we're interested in feedback from users regarding exactly how this analysis would be expected to behave. Some items to consider:
CLS compliance does already check that exposed names do not differ only by case
An FXCop analyzer existed for this, but was not ported to FXCop Analyzers in dotnet/roslyn-analyzers
We need to be careful about code styles that intentionally use names that differ only by case, such as the following naming for properties with backing fields:
private int propertyValue;
public int PropertyValue {
get => propertyValue;
set => propertyValue = value;
}
Some possibilities for an analyzer are:
Other options certainly exist.
Original devcomm ticket
Example