-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathevolution.toon.yaml
More file actions
45 lines (37 loc) · 1.59 KB
/
evolution.toon.yaml
File metadata and controls
45 lines (37 loc) · 1.59 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
37
38
39
40
41
42
43
44
45
# code2llm/evolution | 3602 func | 164f | 2026-05-06
# generated in 0.42s
NEXT[1] (ranked by impact):
[1] !! SPLIT code2llm/exporters/index_generator/renderer.py
WHY: 637L, 1 classes, max CC=1
EFFORT: ~4h IMPACT: 637
RISKS[1]:
⚠ Splitting code2llm/exporters/index_generator/renderer.py may break 2 import paths
METRICS-TARGET:
CC̄: 2.3 → ≤1.6
max-CC: 14 → ≤7
god-modules: 1 → 0
high-CC(≥15): 0 → ≤0
hub-types: 0 → ≤0
PATTERNS (language parser shared logic):
_extract_declarations() in base.py — unified extraction for:
- TypeScript: interfaces, types, classes, functions, arrow funcs
- PHP: namespaces, traits, classes, functions, includes
- Ruby: modules, classes, methods, requires
- C++: classes, structs, functions, #includes
- C#: classes, interfaces, methods, usings
- Java: classes, interfaces, methods, imports
- Go: packages, functions, structs
- Rust: modules, functions, traits, use statements
Shared regex patterns per language:
- import: language-specific import/require/using patterns
- class: class/struct/trait declarations with inheritance
- function: function/method signatures with visibility
- brace_tracking: for C-family languages ({ })
- end_keyword_tracking: for Ruby (module/class/def...end)
Benefits:
- Consistent extraction logic across all languages
- Reduced code duplication (~70% reduction in parser LOC)
- Easier maintenance: fix once, apply everywhere
- Standardized FunctionInfo/ClassInfo models
HISTORY:
prev CC̄=2.3 → now CC̄=2.3