Skip to content

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

Open
@KotlinIsland

Description

@KotlinIsland

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(\\..*)?"]
} 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions