There are multiple languages that are case sensitive. That allows to have classes, methods, properties, and fields to have names that only differ in casing. Although possible, it is a smell of poor design, that I think, deserves a rule.
I’ll give an example in C#, but again, this rule should apply to all languages that are case sensitive.
public class Noncompliant
{
public int lowercase { get; set; }
public int lowerCase { get; set; } // Noncompliant
}
As a separate (but very similar) rule, you could argue that names should also differ in more than snake or kebab casing.
… with an exception for either @deprecated methods (Java) or something equivalent in other languages.
I imagine cases, where the casing of the name needs to change lateron, and you need the old version still lying around for compatibility.
Maybe even another exception: if all-but-one of the (non-deprecated) namesakes-modulo-casing merely call that one representative of that group, then that shouldn’t be flagged.
public class Compliant
{
public int lowercase(String s) { return lowerCase(s); }
public int lowerCase(String s) { /* lower the case */ }
@deprecated public int Lowercase(String s) { /* lower the case some other way */ }
}