SA1305 complains when it shouldn't

Nov 29, 2010 at 4:49 PM


The stylecopcmd complains the Hungarian notations as violations while running the stylecop using command prompt. But through VS 2008 IDE I am not getting these violations. I haven't changed/customized the default setting for style cop.

<Analyzers>    <Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.NamingRules">      <AnalyzerSettings>        <CollectionProperty Name="Hungarian">          <Value>as</Value>          <Value>do</Value>          <Value>id</Value>          <Value>if</Value>          <Value>in</Value>          <Value>is</Value>          <Value>my</Value>          <Value>no</Value>          <Value>on</Value>          <Value>to</Value>          <Value>ui</Value>        </CollectionProperty>      </AnalyzerSettings>    </Analyzer>  </Analyzers>

Violation : RuleNamespace="Microsoft.StyleCop.CSharp.NamingRules" Rule="FieldNamesMustNotUseHungarianNotation" RuleId="SA1305">The variable name 'toAdd' begins with a prefix that looks like Hungarian notation. Remove the prefix or add it to the list of allowed prefixes.</Violation>

Any help?

Nov 30, 2010 at 6:57 AM

Which StyleCop version do you use with stylecopcmd?
Which StyleCop version do you use through VS 2008?

Best regards,
Oleg Shuruev