RuleSet Class

Definition

Represents a set of rules as specified in a ruleset file.

public ref class RuleSet
public class RuleSet
type RuleSet = class
Public Class RuleSet
Inheritance
RuleSet

Constructors

RuleSet(String, ReportDiagnostic, ImmutableDictionary<String,ReportDiagnostic>, ImmutableArray<RuleSetInclude>)

Create a RuleSet.

Properties

FilePath

The file path of the ruleset file.

GeneralDiagnosticOption

The global option specified by the IncludeAll tag.

Includes

List of rulesets included by this ruleset.

SpecificDiagnosticOptions

Individual rule ids and their associated actions.

Methods

GetDiagnosticOptionsFromRulesetFile(String, Dictionary<String,ReportDiagnostic>)

Parses the ruleset file at the given rulesetFileFullPath and returns the following diagnostic options from the parsed file:

  1. A map of specificDiagnosticOptions from rule ID to ReportDiagnostic option.
  2. A global ReportDiagnostic option for all rules in the ruleset file.
GetEffectiveIncludesFromFile(String)

Get the paths to all files contributing rules to the ruleset from the specified file. See also: LoadEffectiveRuleSetFromFile(String).

LoadEffectiveRuleSetFromFile(String)

Load the ruleset from the specified file. This ruleset will contain all the rules resolved from the includes specified in the ruleset file as well. See also: GetEffectiveIncludesFromFile(String).

WithEffectiveAction(ReportDiagnostic)

Create a RuleSet with a global effective action applied on it.

Applies to