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
# .kimun.toml — generated by `km init`
#
# Values are calibrated from the current project state.
# CLI flags always take precedence over values defined here.
# All sections and fields are optional. Omitted fields use built-in defaults.
# ── Code smell detection (km smells) ────────────────────────────────────────
[]
# Flag functions with more than this many body lines.
# Lower values enforce stricter function length discipline.
= {max_lines}}
# Flag functions with more than this many parameters.
# High parameter counts often indicate a missing abstraction.
= {max_params}}
# ── Duplicate code detection (km dups, km report, km score) ─────────────────
[]
# Minimum number of consecutive lines that must match to count as a duplicate.
# Increase to focus on larger, more meaningful duplicates.
= 6 # default: 6
# CI gate: exit with code 1 if the number of duplicate groups exceeds this.
# Uncomment to enforce a duplication budget.
# max_duplicates = 10
# CI gate: exit with code 1 if duplicated lines exceed this percentage.
# Useful for ratcheting down duplication over time.
= {max_dup_ratio}}
# ── Health score (km score) ──────────────────────────────────────────────────
[]
# Scoring model to use.
# - cogcom (default, v0.14+): cognitive complexity as the primary dimension
# - legacy (v0.13): MI + cyclomatic complexity
= "cogcom" # default: cogcom
# CI gate: exit with code 1 if the health score falls below this grade.
# Requires --trend. Valid grades: A++, A+, A, A-, B+, B, B-, C+, C, C-, D+, D, D-, F, F-, F--
= "{{fail_below}}"
# ── File age classification (km age) ─────────────────────────────────────────
[]
# Files modified within this many days are classified as Active.
= 90 # default: 90
# Files not modified for more than this many days are classified as Frozen.
= 365 # default: 365
# ── Temporal coupling (km tc) ────────────────────────────────────────────────
[]
# Minimum number of commits a file must have to be included in the analysis.
# Increase to filter out rarely-changed files.
= 3 # default: 3
# Only show file pairs with coupling strength at or above this threshold.
# Strength ranges from 0.0 (no coupling) to 1.0 (always change together).
# Uncomment to focus on the most strongly coupled pairs.
# min_strength = 0.5
# ── Hotspot analysis (km hotspots) ───────────────────────────────────────────
[]
# Complexity metric used to compute the hotspot score.
# - indent (default): indentation depth — language-agnostic, fast
# - cycom: cyclomatic complexity
# - cogcom: cognitive complexity (SonarSource method)
= "indent" # default: indent