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
The Twice Rule generated warn-only entries into .ccg/auto-rules.yaml, but
generated rules were action:warn and lint only honors action:ignore, so
they never suppressed findings, changed strict pass/fail, or surfaced as
warnings. The feature's only observable effect was writing state files,
while adding a second rules file, merge logic, a migration command, and
consecutive-occurrence history tracking.
Remove it entirely; lint now uses only manual action:ignore rules from
.ccg.yaml. Drops autorules/history sources and the StateFiles port that
existed solely for their state files, the --history-dir and
--migrate-auto-rules flags, and updates the guide docs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: guide/cli-reference.md
+9-13Lines changed: 9 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -244,22 +244,18 @@ Override with `ccg --config path/to/config.yaml`.
244
244
| incomplete | Incomplete annotation |
245
245
| drifted | Annotation not updated after code change |
246
246
247
-
For lint rule matching, both `drifted` and `drift` are accepted for the same category. User-facing reports use `drifted`, while generated state and internal normalization may use `drift`.
247
+
For lint rule matching, both `drifted` and `drift` are accepted for the same category. User-facing reports use `drifted`, while internal normalization may use `drift`.
248
248
249
249
See [Lint Guide](lint.md) for the exact per-category rules, overlaps, and implementation-aligned semantics.
250
250
251
-
Per-category `action: ignore` can be set in `.ccg.yaml`'s `rules`. In `--strict` mode, `action: ignore` rules are applied.
251
+
### Lint Rules
252
252
253
-
### Lint Policy vs Generated State
253
+
Lint policy lives in `.ccg.yaml`'s `rules` section — a list of suppression rules:
254
254
255
-
CCG now separates human-managed lint policy from generated lint state:
255
+
| Field | Purpose |
256
+
|-------|---------|
257
+
| `pattern` | Exact qualified name or regular expression to match |
258
+
| `category` | Lint category the rule applies to (e.g. `unannotated`, `orphan`) |
259
+
| `action` | `ignore` to suppress matching findings |
256
260
257
-
| Path | Owner | Purpose |
258
-
|------|-------|---------|
259
-
| `.ccg.yaml` | Human | Project policy: excludes, include paths, manual lint rules (`ignore`, etc.) |
| `.ccg/auto-rules.yaml` | Generated | Warn-only rules recorded by Twice Rule |
262
-
263
-
`ccg lint`no longer appends generated warn rules into `.ccg.yaml`. Repeated issues are recorded in `.ccg/auto-rules.yaml`, while `.ccg.yaml` remains the place for manual policy decisions.
264
-
265
-
If an older repository already has generated `auto: true` rules inside `.ccg.yaml`, run `ccg lint --migrate-auto-rules` once to move them into `.ccg/auto-rules.yaml`.
261
+
`action: ignore` rules are applied in normal and `--strict` mode alike; findings they match are filtered from the report and excluded from the strict failure count.
0 commit comments