You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For more complex linting requirements that don't fit easily into the other built in types, we could have a contract that looks like this:
[importlinter:contract:my-graph-contract]
name = My contract
type = allow_graph
containers = mypackage
allow =
blue, green -> yellow
blue.alpha -> orange.beta
This contract would, for example, allow mypackage.blue.foo to import from modules contained in mypackage.yellow, but nothing else. Potentially, the expressions could have a richer syntax involving wildcards.
We could also have a forbid_graph type which list the things which aren't allowed instead.
The text was updated successfully, but these errors were encountered:
For more complex linting requirements that don't fit easily into the other built in types, we could have a contract that looks like this:
This contract would, for example, allow
mypackage.blue.foo
to import from modules contained inmypackage.yellow
, but nothing else. Potentially, the expressions could have a richer syntax involving wildcards.We could also have a forbid_graph type which list the things which aren't allowed instead.
The text was updated successfully, but these errors were encountered: