-
Notifications
You must be signed in to change notification settings - Fork 4
Gendarme.Rules.Design.AvoidSmallNamespaceRule(2.10)
Sebastien Pouliot edited this page Jan 22, 2011
·
2 revisions
Assembly: Gendarme.Rules.Design
Version: 2.10
This rule fires if a namespace contains less than five (by default) visible types. Note that this rule enumerates the types in all the assemblies being analyzed instead of simply considering each assembly in turn. The rule exempts:
- specialized namespaces : e.g. *.Design, *.Interop and *.Permissions
- internal namespaces : namespaces without any visible (outside the assemble) types
- small assemblies : that contains a single namespace but less than the minimal number of types (e.g. addins)
- assembly entry point : the namespace of the type being used in an assemble (EXE) entry-point
Bad example:
namespace MyStuff.Special {
// single type inside a namespace
public class Helper {
}
}
Good example:
namespace MyStuff {
public class Helper {
}
// ... many other types ...
}
Some elements of this rule can be customized to better fit your needs.
The minimum number of types which must exist within a namespace.
Note that this page was autogenerated (3/17/2011 9:31:58 PM) based on the xmldoc
comments inside the rules source code and cannot be edited from this wiki.
Please report any documentation errors, typos or suggestions to the
Gendarme Mailing List. Thanks!