-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclippy.toml
More file actions
36 lines (32 loc) · 1.63 KB
/
Copy pathclippy.toml
File metadata and controls
36 lines (32 loc) · 1.63 KB
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
# Hexagonal architecture enforcement — workspace-wide clippy config.
# Pairs with ADR-001-hexagonal-architecture.md and
# scripts/check-dependencies.sh (P1.3) which does the path-scoped
# import bans that rustc cannot express directly.
#
# Hex import rules (canonical — see CLAUDE.md / ADR-001):
# 1. domain/ imports only domain/
# 2. ports/ imports domain/ only
# 3. usecases/ imports domain/ + ports/ only
# 4. adapters/ import ports/ only — never domain/, never usecases/,
# never another adapter <-- P1.2 focus
# 5. composition_root is the ONLY file that imports from adapters/
#
# Clippy enforces what it can structurally (complexity, type/method bans);
# the boundary-direction rules live in scripts/check-dependencies.sh and
# `hex analyze .` (tree-sitter), since clippy lacks per-module path scoping.
cognitive-complexity-threshold = 30
too-many-arguments-threshold = 8
type-complexity-threshold = 250
too-many-lines-threshold = 400
# Public ban list for concrete adapter / domain types that must never
# leak across boundaries. Add an entry the moment a real violation is
# observed in review — keep this list grounded, not speculative.
# Each entry is a fully-qualified type path.
disallowed-types = []
# Banned method-level escape hatches frequently used to bypass the
# adapters-only-via-ports rule (e.g. reaching back into a sibling
# adapter through a global singleton). Same rule: add on observation.
disallowed-methods = []
# Banned macros that bypass module boundaries (e.g. include!/include_str!
# pointing into adapter source trees). Empty by default; grown on observation.
disallowed-macros = []