Skip to content

Commit

Permalink
fix: the cycle between modules is poorly depicted (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
heowc authored Aug 4, 2024
1 parent 9bfefa1 commit 816ebea
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ private static String createDotFormatted(DependencyAnalysisResult result) {
exporter.setEdgeAttributeProvider(edge -> {
final Map<String, Attribute> attributes = new LinkedHashMap<>();
if (cycled.contains(edge.getTarget()) && cycled.contains(edge.getSource())) {
attributes.put("color", DefaultAttribute.createAttribute("red"));
final Set<String> targets = result.getCycleDetector().findCyclesContainingVertex(edge.getSource());
if (targets.contains(edge.getTarget())) {
attributes.put("color", DefaultAttribute.createAttribute("red"));
}
}
return attributes;
});
Expand Down

0 comments on commit 816ebea

Please sign in to comment.