Interface naming - SA1302

Apr 11, 2011 at 7:31 PM


SA1302 rule is about interface naming - InterfaceNamesMustBeginWithI. However, violation of this rule is not reported for interface named "Invokable". Technically such name starts with "I" and does not violate this rule. But according to common .Net naming patterns, one can expect that "IInvokable" is more "correct" name for interface. That "I" is IMO sort of hungarian notation. So, to be fully compliant with .Net naming patterns, SA1302 should be InterfaceNamesMustBeginWithAdditionalI. I know that rename of rule is not an option because of backward compatibility reasons, but maybe implementation could be tweaked to cover such cases. Or maybe second complementary rule could be added, which will ensure that second character in interface name is upper cased. What do you think?


Apr 11, 2011 at 7:36 PM

Yep. Interface names should start with 2 capital letters, the first of which is an 'I'.

Apr 12, 2011 at 9:41 AM

Andy, should I file a bug against SA1302 or new feature request for another rule?

Apr 12, 2011 at 2:57 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.