RIBsTreeMaker icon indicating copy to clipboard operation
RIBsTreeMaker copied to clipboard

Add Support for Multiple Paths

Open jack45j opened this issue 1 year ago • 0 comments

Summary

This PR introduces support for specifying multiple paths as input to the RIBsTreeMaker tool.

Motivation

In certain scenarios, such as when using Bazel or other modular architecture solutions, RIB modules can be independent and not necessarily located within the main project directory. These independent RIB modules may also contain their own sub-RIBs. Hence, supporting multiple input paths is beneficial and necessary to correctly analyze and visualize the entire RIB hierarchy.

Changes

  1. Modified the implementation to handle multiple input paths. Specifically, the code:
let paths = allSwiftSourcePaths(directoryPath: firstArgument)

has been changed to:

let paths = firstArgument.split(separator: ",").flatMap { allSwiftSourcePaths(directoryPath: String($0)) }
  1. Modified the README to reflect the new usage pattern.

jack45j avatar Jul 26 '24 17:07 jack45j