deptrac icon indicating copy to clipboard operation
deptrac copied to clipboard

Add package annotation Collector

Open ariddlestone opened this issue 2 years ago • 2 comments

Can we add a collector which looks for a particular @package annotation from a class-like's docblock to include it in a layer?

It would be really handy for one of my current projects, and I'd be happy to give it a go and produce a PR.

ariddlestone avatar May 23 '23 23:05 ariddlestone

You should be able to do this yourself following https://github.com/qossmic/deptrac/blob/main/docs/extending_deptrac.md#layer-collectors, It should have everything you might need to implement this.

patrickkusebauch avatar May 24 '23 14:05 patrickkusebauch

I've started down this path (a separate collector, outside deptrac), but am having to use qossmic/deptrac rather than deptrac-shim because of #916, and thought it might be useful outside our project.

I'll put together a PR.

ariddlestone avatar May 29 '23 09:05 ariddlestone