Sitrep icon indicating copy to clipboard operation
Sitrep copied to clipboard

Add ability via configuration file to additionally scan swift packages

Open edorphy opened this issue 1 year ago • 1 comments

Hey Paul,

As the good Swift developers we are, we strive to encapsulate reusable code into Swift Packages. Do you think that it would be easy to enhance SitRep to go inspecting Swift Package dependencies too and combine the results into a single report, maybe broken down by app / packages? My use case would be to only count lines of code that I've personally written.

I'm sure this could be done by just invoking SitRep on all of the local swift packages but that would require some addition and combining results from several runs.

Thoughts on the following?

  • Configuration to specify which Swift Package references to be interested in
  • Configuration to specify where Swift Package Manager is configured to save local copies
  • Configuration to specify path to LOCAL Swift Packages --> This is usually my workflow, develop locally, push, then have app checkout from GitHub

edorphy avatar Nov 01 '23 12:11 edorphy

Hello! Sorry for taking such an extraordinarily long time to get around to reading this. Yes, I think this is an excellent idea – I can imagine it more or less being an extra argument + recursive call for the scanning part, but the collation part would take extra work (particularly because package A might require package B, which might require package C), and I'm not entirely sure how it would handle a fresh check out where no dependencies were around. Maybe that just does nothing, because no downloaded packages were found?

twostraws avatar Apr 30 '24 12:04 twostraws