Gate: updated-at-atual
The header’s updated_at is the day of the file’s last commit.
| Property | Value |
|---|---|
| Checker | updated-at-atual |
| Confronts | spec feature code test |
| Blocking by default — new project | yes |
| Blocking by default — existing project | no — informs |
How it measures
Section titled “How it measures”Some findings have a repair that is mechanical and safe: writing the right date into the
updated_at field of a header needs no judgement, only git. anchors check --fix applies those
repairs, and this unit is what it calls. It holds a registry of fixers, one per check; a check with
no registered fixer is only reported, never repaired.
Today the registry holds one fixer, for the updated-at-atual check. It rewrites only the date
inside an existing field: the right date is today when the file has an uncommitted edit, and the
date of its last commit otherwise. When there is no way to know the right date (no git, no commit
and no edit) the file is left alone, because a guessed date would be worse than a stale one.
The repair is driven by the gate’s scope, not by its verdict: every node the gate applies to is handed to the fixer, and a file whose date is already right comes back unchanged, so it is not reported. Each repair written, or attempted and failed, is returned for the caller to print.
Declaring it
Section titled “Declaring it”gates: - name: updated-at-atual on: [spec, feature, code, test] check: updated-at-atual