Skip to content

Commit

Permalink
apply comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mary-georgiou-sonarsource committed Mar 14, 2023
1 parent 887e070 commit 49b29b9
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -127,9 +127,9 @@ public bool HasMatchingScope(DiagnosticDescriptor descriptor)

private bool ShouldAnalyzeFile(SonarLintXmlReader sonarLintXml, string filePath) =>
ProjectConfiguration().ProjectType != ProjectType.Unknown // Not SonarLint context, NuGet or Scanner <= 5.0
|| (FileInclusionCache.GetValue(Compilation, _ => new()) is var cache
&& cache.GetOrAdd(filePath, _ => sonarLintXml.IsFileIncluded(filePath, IsTestProject())));
|| FileInclusionCache.GetValue(Compilation, _ => new()).GetOrAdd(filePath, x => IsFileIncluded(sonarLintXml, x, IsTestProject()));

private bool IsFileIncluded(SonarLintXmlReader sonarLintXml, string filePath, bool v) => throw new NotImplementedException();
private ImmutableHashSet<string> CreateUnchangedFilesHashSet() =>
ImmutableHashSet.Create(StringComparer.OrdinalIgnoreCase, ProjectConfiguration().AnalysisConfig?.UnchangedFiles() ?? Array.Empty<string>());
}

0 comments on commit 49b29b9

Please sign in to comment.