From f1fdebc27797c593b1e57a0ae39dfd4b2f525bc6 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 3 Oct 2026 15:11:20 +0000 Subject: [PATCH] CI: Reject hidden Unicode characters and remove soft hyphens Renovate warned about soft hyphens (U+00AD) in the i.svm.predict and i.svm.train documentation, copied from a reference title. Remove them from the .md and .html files. Add a local pygrep hook that rejects soft hyphens, zero-width characters, bidirectional controls and the byte order mark, which editorconfig-checker does not detect. Translation files are excluded because they legitimately contain some of these characters. Co-Authored-By: Claude Sonnet 5.5 --- .pre-commit-config.yaml | 14 ++++++++++++++ imagery/i.svm.predict/i.svm.predict.html | 2 +- imagery/i.svm.predict/i.svm.predict.md | 2 +- imagery/i.svm.train/i.svm.train.html | 2 +- imagery/i.svm.train/i.svm.train.md | 2 +- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 19b47aadf37..afee941f26f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -118,6 +118,20 @@ repos: rev: v4.0.2 hooks: - id: editorconfig-checker + - repo: local + hooks: + - id: forbid-hidden-unicode + name: forbid hidden Unicode characters + description: >- + Reject invisible characters (soft hyphen, zero-width characters, + bidirectional controls, byte order mark), which editorconfig-checker + does not detect and which Renovate warns about. Translation files + are excluded because they legitimately contain some of them. + language: pygrep + entry: >- + \xc2\xad|\xe2\x80[\x8b-\x8f\xaa-\xae]|\xe2\x81[\xa0-\xa4\xa6-\xa9]|\xef\xbb\xbf + types: [text] + exclude: ^locale/po/ - repo: https://github.com/codespell-project/codespell rev: v2.4.2 hooks: diff --git a/imagery/i.svm.predict/i.svm.predict.html b/imagery/i.svm.predict/i.svm.predict.html index f0dbcf511cb..758e445a5e1 100644 --- a/imagery/i.svm.predict/i.svm.predict.html +++ b/imagery/i.svm.predict/i.svm.predict.html @@ -61,7 +61,7 @@

REFERENCES