You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/CONTEXT-AWARE-LINTING.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,9 +30,9 @@ Configuration (optional)
30
30
}
31
31
32
32
Promoting telemetry to a required PR check
33
-
1) Burn‑in: keep telemetry job non‑blocking for a few PRs; review reported signals and health deltas in CI.
34
-
2) Branch protection: mark the telemetry job (ratchet-context) as “required” in repository settings; optionally remove continue-on-error.
35
-
3) (Optional) Health gating: after calibration, enable policy to block when overall health decreases. This can be added as a future enhancement (tracked in issue) and controlled via config (e.g., ratchet.health.gate with minDelta).
33
+
- Prefer enabling health gating (see HEALTH-GATING.md) via the `ratchet-and-tests` job.
34
+
- Burn‑in: keep `health.enabled=false`, review telemetry; then flip to true and require the job in branch protection.
35
+
- Use `init --ci` or the reusable workflow to wire CI quickly.
36
36
37
37
Notes
38
38
- Support scripts under scripts/**/*.js are excluded from complexity/architecture and plugin-complexity rules, keeping product metrics accurate.
- Optional: also require your test matrix job (e.g., `Test on Node.js 20.x`)
63
+
64
+
## Calibration (burn‑in → enforce)
65
+
1) Burn‑in: keep `health.enabled=false` and watch the reported scores in PRs.
66
+
2) Choose thresholds: set `gateOn` and `minOverall` based on observed ranges.
67
+
3) Flip the switch: set `health.enabled=true` to enforce. The CI job will fail if score < threshold.
44
68
45
69
Troubleshooting
46
70
- No lines.executable in analysis: health falls back to physical lines; check analyzer wiring.
47
71
- Unexpected gate failures: confirm thresholds, gateOn, and any intent override are set as intended; use a one-time bypass with the commit token for urgent fixes.
48
72
73
+
Failure message anatomy
74
+
- HEALTH-GATE FAIL: <message>
75
+
- gateOn, threshold, actual, intent printed for quick diagnosis
76
+
- Example suggestions printed by the ratchet script for common rules
0 commit comments