-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.antipasta.yaml
More file actions
64 lines (57 loc) · 2.44 KB
/
Copy path.antipasta.yaml
File metadata and controls
64 lines (57 loc) · 2.44 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# antipasta configuration file
# Originally generated by: antipasta config generate (generic starter values).
# Reconfigured 2026-07-04 (owner decision, see docs/design/metrics-adoption-plan.md):
# - GATING: per-function metrics only (cyclomatic, cognitive) — these align
# with the house style (compose method drives both toward zero).
# - DEMOTED to informational (still computed, no thresholds): maintainability
# index and file-level Halstead volume/effort. All three penalize file
# length as a side effect of their formulas (maintainability index carries
# a log-of-lines term; volume/effort accumulate per function), which is
# direct pressure AGAINST newspaper-style extraction. The maintainability
# index is additionally a 1990s composite with coefficients the owner
# finds unpredictable and does not trust as a gate.
# - Halstead difficulty kept: it is roughly size-independent (vocabulary
# reuse), so it does not fight the style.
# - lines_of_code gate ADDED (owner, 2026-07-04): a direct per-file length
# cap (1000) is the honest replacement for the demoted composites — the
# owner cares about file length itself, not formulas that smuggle it in.
# Newspaper style grows total lines but stays compatible with a per-file cap.
# - Policy: dogfooding never blocks implementation. New metrics land
# informational-first and are promoted to gates only after being observed
# on this repo (see the adoption plan's closing checklist).
# Default thresholds for all languages
defaults:
max_cyclomatic_complexity: 10.0
max_cognitive_complexity: 15.0
min_maintainability_index: 50.0
# Halstead metrics (advanced)
max_halstead_volume: 1000.0
max_halstead_difficulty: 10.0
max_halstead_effort: 10000.0
# Language-specific configurations
languages:
- name: python
extensions:
- .py
metrics:
- type: cyclomatic_complexity
threshold: 10.0
comparison: "<="
- type: halstead_difficulty
threshold: 10.0
comparison: "<="
- type: cognitive_complexity
threshold: 15.0
comparison: "<="
- type: lines_of_code
threshold: 1000.0
comparison: "<="
# Files and patterns to ignore during analysis
ignore_patterns:
- "**/test_*.py"
- "**/*_test.py"
- "**/tests/**"
# Vendored third-party assets (e.g. the d3 bundle shipped with `antipasta report`)
- "**/report/assets/vendor/**"
# Whether to use .gitignore file for excluding files
use_gitignore: true