setting "ignore privates" "ignore internals" has no effect for internal classes and their subelements
For some strange reason StyleCop does not respect my documentation rule settings. Consider the following code:
internal class SomeClass
{
public SomeClass()
{
}
public SomeMethod()
{
}
public SomeProperty { get; set; }
}
And the following settings:
<Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.DocumentationRules">
...
<AnalyzerSettings>
<BooleanProperty Name="IgnorePrivates">True</BooleanProperty>
<BooleanProperty Name="IgnoreInternals">True</BooleanProperty>
</AnalyzerSetting开发者_C百科s>
</Analyzer>
...
I get the following messages form stylecop 4.4
- SA1600: The class must have a documentation header.
- SA1600: The constructor must have a documentation header.
- SA1600: The method must have a documentation header.
- SA1600: The property must have a documentation header.
Is this a bug or a feature? Shouldn't internal classes be ignored?
If you use Stylecop from within Visual Studio, check if your settings are also ticked under StyleCop Settings -> Documentation Rules, might otherwise overwrite your settings at runtime.
精彩评论