-
Notifications
You must be signed in to change notification settings - Fork 3
Gendarme.Rules.Gendarme.DefectsMustBeReportedRule(git)
Sebastien Pouliot edited this page Mar 2, 2011
·
1 revision
Assembly: Gendarme.Rules.Gendarme
Version: git
This rule checks if at least one method in types implementing IRule is calling Runner.Report.
Bad example:
public class BadRule : Rule, ITypeRule
{
public RuleResult CheckType (TypeDefinition type)
{
return RuleResult.Failure;
}
}
Good example:
public class BadRule : Rule, ITypeRule
{
public RuleResult CheckType (TypeDefinition type)
{
Runner.Report(type, Severity.Low, Confidence.Total);
return RuleResult.Failure;
}
}
- This rule checks if Runner.Report is called directly anywhere in rules' methods but it does not check if it being called in the base type or somewhere else, so some false positives are possible.
You can browse the latest source code of this rule on github.com
Note that this page was autogenerated (3/17/2011 1:55:44 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!