Open Aaronkala opened 1 year ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
大佬请教下,如何检测文件夹之间循环依赖的,有源码可以参考么 @sverweij ,求回复
Summary
We have features/libraries in a
modules/
folder. We'd like to allow a acyclic dependency graph between the modules while guarding against circular dependencies.If a file in
modules/a/
depends on a file inmodules/b/
, nothing inmodules/b/
can depend onmodules/a/
.I noticed that there's a
scope
option. But I'm unsure how would I configure the rule and I'm looking for some examples.Context
The following rule configuration leaks outside the
/modules/
folder causing them to be included in the "circular" detection. Example error caused by this:/module/a
->/common/
->/api/
->/views/
->/module/a
.What I'd love to get is some way to confine the
scope
to only circulars between the/module/
folders. Thevia
examples look like they might provide a fix here, but I'm unsure ifscope: "folder"
supportsvia
yet.The full solution we are trying to implement is:
a
can importb
)Environment