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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

(馃巵) Option to ban importing of module from anywhere #10

Open
KotlinIsland opened this issue Feb 1, 2023 · 0 comments
Open

(馃巵) Option to ban importing of module from anywhere #10

KotlinIsland opened this issue Feb 1, 2023 · 0 comments

Comments

@KotlinIsland
Copy link
Collaborator

KotlinIsland commented Feb 1, 2023

Often times there is a strong use case for: I have utility functions, and I have application code.

Such that the only rule I would like to declare is: Nothing can import application code, except for the application code itself.

This is simpler and more common that the current ruleset is designed for.

Currently to specify this most simple of rules would be like:

banned-imports = '''
{
    "(?!application$|application\.).*": ["application(\\..*)?"]
}
'''

What if there were two options for specifying bans like:

banned-imports = ["application"] # application and any of it's submodules can not be imported by anything outside of application
banned-imports-riced = '''
{
    "(?!application$|application\.).*": ["application(\\..*)?"]
} 
@DetachHead DetachHead pinned this issue Feb 22, 2023
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

1 participant