Skip to content

Commit bc1dac5

Browse files
ZviBaratzclaude
andcommitted
fix(ego-lint): correct R-SLOP-24 guard docs and add missing exit-code assertion
- Fix inaccurate claim that quote prefix avoids matching `desktop.png` — it actually avoids property-access contexts like `this.desktop.theme` - Add assert_exit_code to system-schema-bare test block for consistency - Broaden assertion label to cover all three guard mechanisms tested Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ec45dc7 commit bc1dac5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

skills/ego-lint/references/rules-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2233,7 +2233,7 @@ Rules for APIs removed or changed in specific GNOME Shell versions. These rules
22332233
- **Rule**: `new Gio.Settings()` should not be used in GNOME 45+ extensions.
22342234
- **Rationale**: The `Extension` base class provides `this.getSettings()` which uses the correct schema path automatically. Manually constructing `Gio.Settings` requires specifying the schema ID and may use the wrong compiled schema path.
22352235
- **Fix**: Use `this.getSettings()` in the Extension subclass, or pass a schema ID: `this.getSettings('org.gnome.shell.extensions.my-ext')`.
2236-
- **Guard**: Suppressed when `schema.*org.gnome.` (excluding `shell.extensions.`), string-literal-anchored system schema substrings (`'desktop.` or `"desktop.`), bare `shell.app-switcher`, or enumerated system-schema constants (`KEYBINDINGS_SCHEMA`, `NOTIFICATIONS_SCHEMA`, `DESKTOP_SCHEMA`, `INTERFACE_SCHEMA`, `WM_SCHEMA`, `MUTTER_SCHEMA`, `APP_SWITCHER_SCHEMA`) appear on the match line or within a 5-line forward window. The `desktop.` anchor requires a quote prefix to avoid matching non-schema contexts like `desktop.png` or `this.desktop.theme`. Also skipped in `service/` directories.
2236+
- **Guard**: Suppressed when `schema.*org.gnome.` (excluding `shell.extensions.`), string-literal-anchored system schema substrings (`'desktop.` or `"desktop.`), bare `shell.app-switcher`, or enumerated system-schema constants (`KEYBINDINGS_SCHEMA`, `NOTIFICATIONS_SCHEMA`, `DESKTOP_SCHEMA`, `INTERFACE_SCHEMA`, `WM_SCHEMA`, `MUTTER_SCHEMA`, `APP_SWITCHER_SCHEMA`) appear on the match line or within a 5-line forward window. The `desktop.` anchor requires a quote prefix to avoid matching property-access contexts like `this.desktop.theme`. Also skipped in `service/` directories.
22372237

22382238
### R-SLOP-25: Main.extensionManager.enable/disable
22392239
- **Severity**: advisory

tests/assertions/dash-to-panel-fixes.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,6 @@ echo ""
5454
# --- system-schema-bare (R-SLOP-24 guard for bare system schema identifiers) ---
5555
echo "=== system-schema-bare ==="
5656
run_lint "system-schema-bare@test"
57-
assert_output_not_contains "R-SLOP-24 suppressed for bare desktop. schema" "\[WARN\].*R-SLOP-24"
57+
assert_exit_code "exits with 0 (system schema guards suppress R-SLOP-24)" 0
58+
assert_output_not_contains "R-SLOP-24 suppressed for bare system schema identifiers" "\[WARN\].*R-SLOP-24"
5859
echo ""

0 commit comments

Comments
 (0)