Jurgen,
Please find two custom rules attached to this post (with source code).
You will need to copy the CustomRules\CustomRules\bin\Debug\CustomRules.dll file to "c:\Program Files\SubMain\CodeIt.Right\Rules\" and then add the two new rules to your profile - http://community.submain.com/blogs/howto/archive/2008/01/24/how-to-add-rule-to-user-profile.aspx
Alternatively, you can merge the inner part of the SubMain.CodeItRight.RulesEngine.RulesProfile node below into your profile:
<SubMain.CodeItRight.RulesEngine.RulesProfile Name="My Profile" Description="" Author="">
<CustomRules.UsePrefixForStaticMember>
<Scopes>Public, ProtectedInternal, Private, Abstract, Sealed, Readonly, Virtual, Override, Extern, Unsafe, SpecialName, Const, Volatile, WriteOnly, WithEvents, Default</Scopes>
<Status>Active</Status>
<Targets>Field</Targets>
<Severity>Warning</Severity>
<Title>Use "s_" prefix for static fields</Title>
<Name>Static field -> Use "s_" prefix</Name>
<NextCharCapitalizationStyle>Lower</NextCharCapitalizationStyle>
<PrefixToCheck>s_</PrefixToCheck>
</CustomRules.UsePrefixForStaticMember>
<CustomRules.UsePrefixForNonStaticMember>
<Scopes>Public, ProtectedInternal, Private, Abstract, Sealed, Readonly, Virtual, Override, Extern, Unsafe, SpecialName, Const, Volatile, WriteOnly, WithEvents, Default</Scopes>
<Status>Active</Status>
<Targets>Field</Targets>
<Severity>Warning</Severity>
<Title>Use "m_" prefix for non-static fields</Title>
<Name>Non-static fields -> Use "m_" prefix</Name>
<NextCharCapitalizationStyle>Lower</NextCharCapitalizationStyle>
<PrefixToCheck>m_</PrefixToCheck>
</CustomRules.UsePrefixForNonStaticMember>
</SubMain.CodeItRight.RulesEngine.RulesProfile>
Please let me know how these working out for you.
Thank you,
Serge Baranovsky
http://submain.com - .NET Developer Tools | Microsoft VB MVP | http://vbcity.com - VB Developer Community
» » (Static Code Analysis + Automatic Refactoring) / Painless Coding Guidelines = CodeIt.Right - http://submain.com/codeit.right
» » C#/VB .NET Coding Guidelines - FREE 100+ page ebook (PDF) http://submain.com/guidelines