Share via


RuleConfiguration Class

Definition

Specifies how a rule should be configured - should this be enabled or disabled? What severity should be applied for the rule?

public class RuleConfiguration
type RuleConfiguration = class
Public Class RuleConfiguration
Inheritance
RuleConfiguration
Derived

Constructors

RuleConfiguration(String, Boolean, SqlRuleProblemSeverity)

Creates a new RuleConfiguration for a rule.

RuleConfiguration(String)

Creates a new RuleConfiguration for a rule, using the default settings for Enabled and Severity.

Properties

Enabled

Specifies if the rule is enabled and should be included in the code analysis.

The default value is true

Namespace

Gets the namespace for the rule. This is the part of the rule that precedes the final "." in the ID name. For instance for a rule ID "My.Org.MyRuleName", the namespace would be "My.Org".

RuleId

Gets the unique Id used to identify the rule. This is the fully qualified ID, which would usually be in the form "My.Org.MyRuleName".

Severity

What severity should problems created by the rule have?

The default severity is Warning

ShortRuleId

Gets the last part of the rule ID. This is the part of the rule that follows the final "." in the ID name. For instance for a rule ID "My.Org.MyRuleName", the short rule ID would be "MyRuleName".

Applies to