Commit d0aa077
Solomon
fix(check-schema): use <schema>-specific grep to avoid <enum id=> FP
`grep -oP 'id="[^"]*"' | head -1` matched the first `id=` attribute in
the file, which could be from a `<enum id="...">` element that appears
before `<schema id="...">` in schema files that define GSettings enums.
Reproduced on caffeine: three `<enum>` elements precede the `<schema>`
element, causing the wrong ID to be extracted and triggering false FAIL
results for `schema/id-matches` and `schema/filename-convention`.
Fix: introduce `extract_schema_id()` which pre-filters to lines
containing `<schema\b` before extracting the `id=` attribute.
The old one-liner is replaced at all three call sites.
Fixes false positive reported in field test 2026-03-22.1 parent e74c508 commit d0aa077
1 file changed
+14
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
11 | 21 | | |
12 | 22 | | |
13 | 23 | | |
| |||
53 | 63 | | |
54 | 64 | | |
55 | 65 | | |
56 | | - | |
57 | | - | |
| 66 | + | |
| 67 | + | |
58 | 68 | | |
59 | 69 | | |
60 | 70 | | |
| |||
65 | 75 | | |
66 | 76 | | |
67 | 77 | | |
68 | | - | |
| 78 | + | |
69 | 79 | | |
70 | 80 | | |
71 | 81 | | |
| |||
97 | 107 | | |
98 | 108 | | |
99 | 109 | | |
100 | | - | |
| 110 | + | |
101 | 111 | | |
102 | 112 | | |
103 | 113 | | |
| |||
0 commit comments