22
33> Like a mille crêpe — your architecture, one clean layer at a time.
44
5- ```
6- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ presentation
7- · · · · · · · · · · · · · · · · · · (deps only flow inward)
8- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ infrastructure
9- · · · · · · · · · · · · · · · · · ·
10- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ usecase
11- · · · · · · · · · · · · · · · · · ·
12- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ domain
13- ```
14-
155` mille ` is a static analysis CLI that enforces ** dependency rules for layered architectures** — Clean Architecture, Onion Architecture, Hexagonal Architecture, and more.
166
177One TOML config. Rust-powered. CI-ready. Supports multiple languages from a single config file.
188
199## What it checks
2010
21- | Check | Rust | Go | TypeScript | JavaScript | Python | Java | Kotlin | PHP | C |
22- | ---| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
23- | Layer dependency rules (` dependency_mode ` ) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
24- | External library rules (` external_mode ` ) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
25- | DI method call rules (` allow_call_patterns ` ) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
26- | Naming convention rules (` name_deny ` ) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
11+ ** Languages:** Rust, Go, TypeScript, JavaScript, Python, Java, Kotlin, PHP, C
12+
13+ | Check | Description |
14+ | ---| ---|
15+ | ` dependency_mode ` | Layer dependency rules — control which layers can import from which |
16+ | ` external_mode ` | External library rules — restrict third-party package usage per layer |
17+ | ` allow_call_patterns ` | DI method call rules — limit which methods may be called on injected types |
18+ | ` name_deny ` | Naming convention rules — forbid infrastructure keywords in domain/usecase |
2719
2820## Install
2921
@@ -435,7 +427,7 @@ Exit codes:
435427| ` external_deny ` | Forbidden external packages (when ` external_mode = "opt-out" ` ) |
436428| ` name_deny ` | Forbidden keywords for naming convention check (case-insensitive partial match) |
437429| ` name_allow ` | Substrings to strip before ` name_deny ` check (e.g. ` "category" ` prevents ` "go" ` match inside it) |
438- | ` name_targets ` | Targets to check: ` "file" ` , ` "symbol" ` , ` "variable" ` , ` "comment" ` (default: all) |
430+ | ` name_targets ` | Targets to check: ` "file" ` , ` "symbol" ` , ` "variable" ` , ` "comment" ` , ` "string_literal" ` (default: all) |
439431| ` name_deny_ignore ` | Glob patterns for files to exclude from naming checks (e.g. ` "**/test_*.rs" ` ) |
440432
441433#### Naming Convention Check (` name_deny ` )
@@ -454,7 +446,7 @@ external_deny = []
454446# Usecase layer must not reference specific infrastructure technologies
455447name_deny = [" gcp" , " aws" , " azure" , " mysql" , " postgres" ]
456448name_allow = [" category" ] # "category" contains "go" but should not be flagged
457- name_targets = [" file" , " symbol" , " variable" , " comment" ] # default: all targets
449+ name_targets = [" file" , " symbol" , " variable" , " comment" , " string_literal " ] # default: all targets
458450name_deny_ignore = [" **/test_*.rs" , " tests/**" ] # exclude test files from naming checks
459451```
460452
@@ -468,7 +460,8 @@ name_deny_ignore = ["**/test_*.rs", "tests/**"] # exclude test files from namin
468460 - ` "symbol" ` : function, class, struct, enum, trait, interface, type alias names
469461 - ` "variable" ` : variable, const, let, static declaration names
470462 - ` "comment" ` : inline comment content
471- - Supported languages: Rust, TypeScript, JavaScript, Python, Go, Java, Kotlin, PHP
463+ - ` "string_literal" ` : string literal content
464+ - Supported languages: Rust, TypeScript, JavaScript, Python, Go, Java, Kotlin, PHP, C
472465- Severity is controlled by ` severity.naming_violation ` (default: ` "error" ` )
473466
474467### ` [[layers.allow_call_patterns]] `
0 commit comments