Can the "Naming Styles" in ReSharper 4.5 be used to enforce Hungarian Notation?

Ok - just to preface - not to open up a religious zealotry on Hungarian notation one way or another - just a technical question as to the capabilities of the "Naming Styles" options in ReSharper 4.5 -- is it possible to inspect for variable types and enforce on that, i.e. "integer" variable names must start with "i"?

3 comments

Why would you want to?

Sorry.  Even Microsoft doesn't use Simonyi's conventions anymore.

0

Hello Lance,

It is not possible out of the box, but naming conventions was made expandable,
so theoretically you could be able to write a plugin to ReSharper to enable
whatever naming conventions you need. However, due to the fact that we didn't
try to write such plugin ourselves, it could be that API is not enough to
fulfill needs for such plugin. One problem that I can see is that when you
need to "invent" a name for some entity, it could very well be nonexisting,
and thus you may have not enough information to decide on the name.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


IR> Ok - just to preface - not to open up a religious zealotry on
IR> Hungarian notation one way or another - just a technical question as
IR> to the capabilities of the "Naming Styles" options in ReSharper 4.5
IR> -- is it possible to inspect for variable types and enforce on that,
IR> i.e. "integer" variable names mu
IR>
IR> st start with "i"?
IR>
IR> ---
IR> Original message URL:
IR> http://www.jetbrains.net/devnet/message/5235520#5235520


0

Thanks Ilya -- I'll need to look at writting ReSharper plug-ins.  What resource(s) do you suggest starting with?

Loving ReSharper 4.5 so far!

...Lance

0

Please sign in to leave a comment.