Commit 1fec6ed
fix(check-schema): check ALL schema IDs for settings-schema match
When gschema.xml contains multiple <schema> elements (e.g. a main schema
plus a .keybindings sub-schema), the previous code extracted only the
first <schema id=...> attribute. If a sub-schema appeared first (as in
PaperWM, where org.gnome.shell.extensions.paperwm.keybindings precedes
the main org.gnome.shell.extensions.paperwm schema), schema/id-matches
and schema/filename-convention both produced false-positive FAILs even
though the correct schema was present.
Changes:
- Extract all schema IDs via new extract_all_schema_ids() helper
- Refactor extract_schema_id() to use it (single-schema case unchanged)
- Add schema_id_in_file() to test membership across all <schema> elements
- schema/id-matches: pass if settings-schema is found in ANY schema element
- schema/filename-convention: use settings-schema as the reference ID when
settings-schema is defined in metadata.json (not the first schema found)
- Add multi-schema@test fixture reproducing the PaperWM layout
- Add 4 assertions to run-tests.sh covering the new behaviour
Fixes false-positive FAILs on PaperWM and any extension that uses
sub-schemas (keybindings, overrides, etc.) in a single gschema.xml.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent dad1e72 commit 1fec6ed
File tree
5 files changed
+80
-15
lines changed- skills/ego-lint/scripts
- tests
- fixtures/multi-schema@test
- schemas
5 files changed
+80
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
16 | 23 | | |
17 | 24 | | |
18 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
19 | 33 | | |
20 | 34 | | |
21 | 35 | | |
| |||
63 | 77 | | |
64 | 78 | | |
65 | 79 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
70 | 85 | | |
71 | | - | |
| 86 | + | |
| 87 | + | |
72 | 88 | | |
73 | 89 | | |
74 | 90 | | |
75 | 91 | | |
76 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
77 | 96 | | |
78 | | - | |
79 | | - | |
80 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
81 | 104 | | |
82 | 105 | | |
83 | | - | |
| 106 | + | |
84 | 107 | | |
85 | 108 | | |
86 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
469 | 478 | | |
470 | 479 | | |
471 | 480 | | |
| |||
0 commit comments