From 9ed362ab217d19a93f6c1b9fa117cee9dead0f3e Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 05:29:26 +0000 Subject: [PATCH] Skip .copier-answers.yml in the scaffolded typos hook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The file is generated, and its `_commit` is whatever ref the last update resolved to. Between releases that is a git describe string rather than a plain tag, so it carries a run of raw hex — and a short hex run is a coin flip away from spelling something typos reads as a misspelling. One duly landed on main and failed the render job of template CI. Nothing in the file is prose, so checking it can only ever produce false positives, on a schedule nobody controls. Verified by rendering both variants at HEAD and running each scaffold's full pre-commit stack: all hooks pass. Then, on a rendered app with `_commit` forced to the exact value that broke CI, typos passes with the exclude and fails without it. The comment deliberately does not quote a real example, which would trip the hook in this file. --- CHANGELOG.md | 4 ++++ template/.pre-commit-config.yaml.jinja | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27a7ec9..5d4e3d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ Entries for 1.0.0 through 1.5.2 were backfilled from git history after the fact, ## [Unreleased] +### Fixed + +- The scaffolded typos hook skips `.copier-answers.yml`. The file is generated, and its `_commit` is whatever ref the last update used — when that is a short SHA rather than a tag, its leading hex characters are a coin flip away from a word typos reads as misspelled, and `ba338ef` duly tripped `ba` → `by`, `be`. Nothing in the file is prose, so checking it could only ever produce false positives, on a schedule nobody controls. + ## [1.8.1] - 2026-08-07 Repairs 1.8.0, which shipped a lightweight tag and left every project unable to update. Consumers land on 1.8.1 rather than 1.8.0; the contents are the same bar this fix. diff --git a/template/.pre-commit-config.yaml.jinja b/template/.pre-commit-config.yaml.jinja index 6c46ab4..810f473 100644 --- a/template/.pre-commit-config.yaml.jinja +++ b/template/.pre-commit-config.yaml.jinja @@ -67,6 +67,14 @@ repos: # correction needs a human to approve it, so --write-changes is dropped. - id: typos # spell-check code, comments, and docs args: [--force-exclude] + # .copier-answers.yml is generated, and its `_commit` is whatever ref + # the last update resolved to. Between releases that is a git describe + # string rather than a plain tag, so it carries a run of raw hex -- and + # a short hex run is a coin flip away from spelling something typos + # reads as a misspelled word. Nothing in the file is prose, so checking + # it can only ever produce false positives, on a schedule nobody + # controls. (Quoting a real example here would trip the same hook.) + exclude: ^\.copier-answers\.yml$ {% endif %} - repo: https://github.com/zizmorcore/zizmor-pre-commit