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

Make it possible to express independence within a layers contract #157

Closed
seddonym opened this issue Feb 3, 2023 · 4 comments
Closed

Make it possible to express independence within a layers contract #157

seddonym opened this issue Feb 3, 2023 · 4 comments

Comments

@seddonym
Copy link
Owner

seddonym commented Feb 3, 2023

It would be nice to express independent layers within a layers contract by putting the layers on one line, like so:

[importlinter:contract:my-layers-contract]
name = My three-tier layers contract (multiple root packages)
type = layers
layers=
    high
    medium_green medium_blue medium_yellow
    low
@flaeppe
Copy link
Contributor

flaeppe commented Feb 23, 2023

I've actually implemented a version of this in one of the projects I'm working on. With nearly identical config as you're suggesting here.

Let me see if I can port it to a PR draft here, if you want?

@flaeppe
Copy link
Contributor

flaeppe commented Feb 23, 2023

I pushed #162, if it's of interest. Have a look if you wish

@seddonym
Copy link
Owner Author

Thanks for the contribution! Will definitely look at the draft PR when I come to tackle this.

@seddonym
Copy link
Owner Author

This is now available as of v1.11, enjoy!

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

Successfully merging a pull request may close this issue.

2 participants