C# Class SonarLint.VisualStudio.Integration.RuleSetHelper

Mostra file Open project: SonarSource-VisualStudio/sonarlint-visualstudio Class Usage Examples

Public Methods

Method Description
FindAllIncludesUnderRoot ( RuleSet ruleSet, string rootDirectory ) : IEnumerable

Find all the RuleSetInclude, for a ruleSet, which are referencing rule sets under rootDirectory

FindInclude ( RuleSet source, RuleSet target ) : RuleSetInclude

Return a non-nested include from source to target

UpdateExistingProjectRuleSet ( RuleSet ruleSet, string solutionRuleSetPath ) : void

Updates the ruleSet by deleting all the previously included rule sets that were in the same folder as solutionRuleSetPath and then includes the rule set specified by solutionRuleSetPath.

The update is in-memory to the ruleSet and we rely on the fact that we previously generated the 'solutionRuleSet' to the same folder as the updated solutionRuleSetPath

Private Methods

Method Description
RemoveAllIncludesUnderRoot ( RuleSet ruleSet, string rootDirectory ) : void

Remove all rule set inclusions which exist under the specified root directory.

Method Details

FindAllIncludesUnderRoot() public static method

Find all the RuleSetInclude, for a ruleSet, which are referencing rule sets under rootDirectory
public static FindAllIncludesUnderRoot ( RuleSet ruleSet, string rootDirectory ) : IEnumerable
ruleSet RuleSet
rootDirectory string
return IEnumerable

FindInclude() public static method

Return a non-nested include from source to target
public static FindInclude ( RuleSet source, RuleSet target ) : RuleSetInclude
source RuleSet Required
target RuleSet Required
return RuleSetInclude

UpdateExistingProjectRuleSet() public static method

Updates the ruleSet by deleting all the previously included rule sets that were in the same folder as solutionRuleSetPath and then includes the rule set specified by solutionRuleSetPath.
The update is in-memory to the ruleSet and we rely on the fact that we previously generated the 'solutionRuleSet' to the same folder as the updated solutionRuleSetPath
public static UpdateExistingProjectRuleSet ( RuleSet ruleSet, string solutionRuleSetPath ) : void
ruleSet RuleSet Existing project level rule set
solutionRuleSetPath string Full path of solution level rule set (one that was generated during bind)
return void