-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to exclude same layer, different name? #1030
Comments
You don't need to exclude the other modules, Deptrac does this for you by default. However yes, you need to specify each of the modules separately. |
Ah, Ok. I will try a config like so and report to you if it doesn't work as intended deptrac:
paths:
- ./ # AllModules resides here
layers:
-
name: CartModule
collectors:
- type: glob
value: AllModules/CartModule/**
-
name: ProductsModule
collectors:
- type: glob
value: AllModules/ProductsModule/**
Is there a way to do this programmatically? I imagine this requires a new issue but here's the thing: Suphle (my framework) has a command for creating modules. So it'll be elegant if new module was automatically included in config above. |
There is no direct support for programmatic definitions in Deptrac right now. However, #1002 introduces PHP configuration instead of YAML and that should make it substantially easier for you to cook something up. |
@patrickkusebauch I've just checked and can't see a php configuration. I was expecting to see a way to define the rules using php rather than yaml like your comment suggested. Or am I missing something? |
Yeah, my link was wrong. Updated it with the right link to the PR implementing it. |
Closed in #1002 |
Sorry, if this has already been asked. Couldn't tell where to look. The examples show how to group by a Models layer and prevent that from leaking into Views or something. But what if I've got multiple Models, or Modules within a shared namespace, is it possible to distinguish between each module, preventing them reaching into each other? The way I think this can be achieved is by specifying each module by hand and manually excluding the other module layers, but I imagine there must be a more elegant way to go about it
The text was updated successfully, but these errors were encountered: