Skip to content

File cache in CodeAnalysisRuleSetPredictor does not consider the rule set directories #136

@stan-sz

Description

@stan-sz

The cache hit is based on file path

if (_cachedInputs.TryGetValue(ruleSetPath, out HashSet<string> cachedResults))

however some projects may load the same ruleset file with different value of CodeAnalysisRuleSetDirectories. In case a ruleset file with includes and empty CodeAnalysisRuleSetDirectories is parsed (and cached), the included will be omitted. Subsequent parsing of the same ruleset file, will yield the same, small set of inputs, despite the fact that they may provide more directories in CodeAnalysisRuleSetDirectories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions