1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
[tool.importlinter] root_packages = [ "bk_itsm_apps", "config", "tests", ]
[[tool.importlinter.contracts]] name = "Domain should not import Django ORM" type = "forbidden" source_modules = [ "bk_itsm_apps.*.domain", "bk_itsm_apps.*.domain.*", ] forbidden_modules = [ "django.db", "rest_framework", ]
[[tool.importlinter.contracts]] name = "App modules should be independent" type = "independence" modules = [ "bk_itsm_apps.ticket", "bk_itsm_apps.workflow", "bk_itsm_apps.sla", "bk_itsm_apps.service", ]
ignore_imports = [ "bk_itsm_apps.* -> bk_itsm_apps.core.*", "bk_itsm_apps.* -> bk_itsm_apps.common.*", ]
[[tool.importlinter.contracts]] name = "Layered Architecture" type = "layers" containers = [ "bk_itsm_apps.ticket", "bk_itsm_apps.workflow", "bk_itsm_apps.sla", ] layers = [ "views", "apis", "services", "domain", "models", ]
[[tool.importlinter.contracts]] name = "Tests should not import production config" type = "forbidden" source_modules = [ "tests", ] forbidden_modules = [ "config.settings.production", "config.settings.staging", ]
[[tool.importlinter.contracts]] name = "Config modules independence" type = "independence" modules = [ "config.settings.development", "config.settings.production", "config.settings.staging", "config.settings.test", ]
ignore_imports = [ "config.settings.* -> config.settings.base", ]
|