Skip to content
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

Question: Do not allow any imports #223

Closed
kkirsche opened this issue Apr 11, 2024 · 1 comment
Closed

Question: Do not allow any imports #223

kkirsche opened this issue Apr 11, 2024 · 1 comment

Comments

@kkirsche
Copy link

👋 Thanks for the great library!

I was wondering if I was missing something, but is there a simple contract type to simply say this module should not import any other module? For example, a module of constants? This avoids the need for having to define all the modules that are within a project.

Thanks, and sorry if this is a dumb question. I appreciate your time and help.

@seddonym
Copy link
Owner

Hi! Not a dumb question at all!

There is an open ticket for that and indeed a pull request submitted by @sbrugman. I have left comments but unfortunately it seems to have gone stale.

In the meantime you could look at a layers contract with that module being the lowest layer. You'd have to explicitly list the other sibling modules though. You could also do it with not too much code as a custom contract. Or - even simpler - just grep for the work import in a completely custom script!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants