Skip to content

Commit 373af61

Browse files
committed
ci: add stdlib lowercase naming check (prevents PascalCase regression)
1 parent 11b382d commit 373af61

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Stdlib naming convention check
3+
#
4+
# Enforces: stdlib/*.affine filenames are lowercase.
5+
#
6+
# Why: a 2026-04 transition introduced lowercase versions alongside
7+
# pre-existing PascalCase ones (Math.affine + math.affine etc.).
8+
# This caused a permanent case-collision on case-insensitive
9+
# filesystems (Windows NTFS, default macOS). Pinning the convention
10+
# at lowercase prevents the duplicate-file regression.
11+
12+
name: Stdlib Naming Convention
13+
14+
on:
15+
push:
16+
branches: [main]
17+
pull_request:
18+
branches: [main]
19+
20+
permissions:
21+
contents: read
22+
23+
jobs:
24+
enforce-lowercase-stdlib:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
28+
29+
- name: Enforce lowercase .affine filenames in stdlib/
30+
run: |
31+
BAD=$(find stdlib -maxdepth 1 -type f -name '*.affine' | grep -E '/stdlib/[A-Z]' || true)
32+
if [ -n "$BAD" ]; then
33+
echo "❌ stdlib/ requires lowercase .affine filenames. Found:"
34+
echo "$BAD"
35+
echo ""
36+
echo "Convention: stdlib/foo.affine, not stdlib/Foo.affine."
37+
echo "PascalCase files cause case-collision on case-insensitive"
38+
echo "filesystems (Windows NTFS, default macOS HFS+/APFS) when a"
39+
echo "lowercase counterpart also exists in the tree."
40+
exit 1
41+
fi
42+
echo "✅ stdlib/ filenames lowercase OK"

0 commit comments

Comments
 (0)