a73x

c9afa079

fix: deadcode.sh looks where the code moved to

a73x   2026-08-29 00:58

Commit message
fix: deadcode.sh looks where the code moved to

The glob stopped at src/*.zig, so since the domain folders landed it had
reported on four files and called the other fifty clean.

tools/deadcode.sh
Old New
@@ -13,7 +13,10 @@
13 # - a name defined in two files: a reference to either hides both 13 # - a name defined in two files: a reference to either hides both
14 set -u 14 set -u
15 cd "$(dirname "$0")/.." 15 cd "$(dirname "$0")/.."
16 for f in src/*.zig test/*.zig; do 16 # src/*/*.zig as well as src/*.zig: the code lives in domain folders, and a
17 # glob that stopped at the top level reported on the four files left there
18 # and called the other fifty clean.
19 for f in src/*.zig src/*/*.zig test/*.zig; do
17 grep -oE '^[[:space:]]*pub (inline )?(fn|const|var) [A-Za-z_][A-Za-z0-9_]*' "$f" \ 20 grep -oE '^[[:space:]]*pub (inline )?(fn|const|var) [A-Za-z_][A-Za-z0-9_]*' "$f" \
18 | awk '{print $NF}' \ 21 | awk '{print $NF}' \
19 | while read -r name; do 22 | while read -r name; do