kimun 0.31.0

Code metrics tool — health score, complexity, duplication, hotspots, ownership
# .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) ────────────────────────────────────────

[smells]
# Flag functions with more than this many body lines.
# Lower values enforce stricter function length discipline.
max_lines = {{max_lines}}

# Flag functions with more than this many parameters.
# High parameter counts often indicate a missing abstraction.
max_params = {{max_params}}

# ── Duplicate code detection (km dups, km report, km score) ─────────────────

[dups]
# Minimum number of consecutive lines that must match to count as a duplicate.
# Increase to focus on larger, more meaningful duplicates.
min_lines = 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 = {{max_dup_ratio}}

# ── Health score (km score) ──────────────────────────────────────────────────

[score]
# Scoring model to use.
# - cogcom  (default, v0.14+): cognitive complexity as the primary dimension
# - legacy  (v0.13):           MI + cyclomatic complexity
model = "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 = "{{fail_below}}"

# ── File age classification (km age) ─────────────────────────────────────────

[age]
# Files modified within this many days are classified as Active.
active_days = 90   # default: 90

# Files not modified for more than this many days are classified as Frozen.
frozen_days = 365  # default: 365

# ── Temporal coupling (km tc) ────────────────────────────────────────────────

[tc]
# Minimum number of commits a file must have to be included in the analysis.
# Increase to filter out rarely-changed files.
min_degree = 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) ───────────────────────────────────────────

[hotspots]
# Complexity metric used to compute the hotspot score.
# - indent  (default): indentation depth — language-agnostic, fast
# - cycom:             cyclomatic complexity
# - cogcom:            cognitive complexity (SonarSource method)
complexity = "indent"  # default: indent