Skip to content

Commit

Permalink
Fix after change of DisjointSets data structure to a class
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioaversa committed Apr 19, 2024
1 parent e0ba04d commit c4ac7ce
Showing 1 changed file with 3 additions and 4 deletions.
Expand Up @@ -19,7 +19,6 @@
*/

using System.Collections.Concurrent;
using static SonarAnalyzer.Helpers.DisjointSetsPrimitives;

namespace SonarAnalyzer.Rules.CSharp;

Expand Down Expand Up @@ -87,13 +86,13 @@ private static void CheckApiController(SonarSymbolStartAnalysisContext symbolSta

symbolStartContext.RegisterSymbolEndAction(symbolEndContext =>
{
var parents = memberNames.ToDictionary(x => x, x => x); // Start with singleton sets
var dependencySets = new DisjointSets(memberNames);
foreach (var dependency in dependencies)
{
Union(parents, dependency.From, dependency.To);
dependencySets.Union(dependency.From, dependency.To);
}
var responsibilityGroups = DisjointSets(parents);
var responsibilityGroups = dependencySets.GetAllSets();
if (responsibilityGroups.Count > 1)
{
var secondaryLocations = SecondaryLocations(controllerSymbol, responsibilityGroups);
Expand Down

0 comments on commit c4ac7ce

Please sign in to comment.