Skip to content

Commit 05d13a8

Browse files
hyperpolymathcodacy-production[bot]coderabbitai[bot]
authored
fix(ci): the invisible-character gate never matched anything (#56)
**Measured 2026-08-27: this gate caught 0 of 6 invisible-character test cases.** It has never detected an NBSP, zero-width space, BOM, soft hyphen, bidi override or word joiner. ## Root cause The pattern used UTF-8 **byte sequences** (`\xc2\xa0`) while `grep -P` matches **characters**. Bytes `c2 a0` are *one* character U+00A0; `\xc2\xa0` asks for *two*, U+00C2 then U+00A0 — never present. ``` grep -P '\xc2\xa0' -> miss grep -P '\x{a0}' -> MATCH ``` Only `\x00` worked, being single-byte in both readings. The gate ran, passed, and could not see what it exists to see. ## Fixed - **codepoint escapes** in place of byte sequences - **C0 controls** `\x01-\x08,\x0B,\x0C,\x0E-\x1F` added (TAB/LF/CR excluded) - **`grep -a`** — without it grep skips any NUL-bearing file as binary The C0 range matters: a stray **backspace byte** made a workflow unparseable in `developer-ecosystem`, so it never ran — and this linter called it clean. Canonical fix: hyperpolymath/empty-linter#70. **1 file(s)** here. **Verified:** YAML re-parsed, and the corrected pattern was confirmed to catch a real NBSP before the change was kept. --------- Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com> Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 32be073 commit 05d13a8

10 files changed

Lines changed: 11 additions & 2 deletions

File tree

‎.github/workflows/dogfood-gate.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
# Checks for: zero-width spaces, zero-width joiners, BOM, soft hyphens,
128128
# non-breaking spaces, null bytes, and other invisible Unicode in source files.
129129
set +e
130-
PATTERNS='\xc2\xa0|\xe2\x80\x8b|\xe2\x80\x8c|\xe2\x80\x8d|\xef\xbb\xbf|\xc2\xad|\xe2\x80\x8e|\xe2\x80\x8f|\xe2\x80\xaa|\xe2\x80\xab|\xe2\x80\xac|\xe2\x80\xad|\xe2\x80\xae|\x00'
130+
PATTERNS='(*UTF)[\x00-\x08\x0B\x0C\x0E-\x1F\x{a0}\x{ad}\x{200b}-\x{200f}\x{202a}-\x{202f}\x{2060}\x{2066}-\x{2069}\x{feff}]'
131131
find "$GITHUB_WORKSPACE" \
132132
-not -path '*/.git/*' -not -path '*/node_modules/*' \
133133
-not -path '*/.deno/*' -not -path '*/target/*' \
@@ -138,7 +138,7 @@ jobs:
138138
-o -name '*.yml' -o -name '*.yaml' -o -name '*.md' -o -name '*.adoc' \
139139
-o -name '*.idr' -o -name '*.zig' -o -name '*.v' -o -name '*.jl' \
140140
-o -name '*.gleam' -o -name '*.hs' -o -name '*.ml' -o -name '*.sh' \) \
141-
-exec grep -Prl "$PATTERNS" {} \; > /tmp/empty-lint-results.txt 2>/dev/null
141+
-exec grep -alP "$PATTERNS" {} + > /tmp/empty-lint-results.txt
142142
EL_EXIT=$?
143143
set -e
144144

‎.machine_readable/arrival-pack/claude-md.k9.ncl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
K9!
12
# SPDX-License-Identifier: MPL-2.0
23
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
34
#

‎.machine_readable/coaptation/coapt.k9.ncl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
K9!
12
# SPDX-License-Identifier: MPL-2.0
23
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
34
#

‎.machine_readable/contractiles/adjust/adjust.k9.ncl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
K9!
12
# SPDX-License-Identifier: MPL-2.0
23
# adjust.k9.ncl — K9 trust-tier component of the adjust trident
34
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>

‎.machine_readable/contractiles/bust/bust.k9.ncl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
K9!
12
# SPDX-License-Identifier: MPL-2.0
23
# bust.k9.ncl — K9 trust-tier component of the bust trident
34
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>

‎.machine_readable/contractiles/dust/dust.k9.ncl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
K9!
12
# SPDX-License-Identifier: MPL-2.0
23
# dust.k9.ncl — K9 trust-tier component of the dust trident
34
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>

‎.machine_readable/contractiles/intend/intend.k9.ncl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
K9!
12
# SPDX-License-Identifier: MPL-2.0
23
# intend.k9.ncl — K9 trust-tier component of the intend trident
34
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>

‎.machine_readable/contractiles/must/must.k9.ncl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
K9!
12
# SPDX-License-Identifier: MPL-2.0
23
# must.k9.ncl — K9 trust-tier component of the must trident
34
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>

‎.machine_readable/contractiles/trust/trust.k9.ncl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
K9!
12
# SPDX-License-Identifier: MPL-2.0
23
# trust.k9.ncl — K9 trust-tier component of the trust trident
34
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>

‎container/stapeln/deploy.k9.ncl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
K9!
12
# SPDX-License-Identifier: MPL-2.0
23
# deploy.k9.ncl — {{PROJECT_NAME}} deployment component (Hunt level)
34
#

0 commit comments

Comments
 (0)