Review of "Keyboard Backlight Scheduler" version 1

Details Page Preview

Schedule keyboard backlight brightness with multiple time periods. Control your ASUS keyboard backlight automatically based on time of day.

Extension Homepage
https://github.com/cscortes/BacklightKeyboardGnomeExtension

No comments.

FAQ

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

Shexli (experimental) warning 4

Shexli found 4 issues that may need reviewer attention.

EGO-A-004 warning

extension files should not contain excessive ungated console logging

File contains 12 ungated console.log/warn/error calls (threshold: 5).

No excessive logging

  • extension.js:359
    console.log(`[KbdBacklight] v${ver} enabled`)
  • extension.js:377
    console.log(`[KbdBacklight] GSD Steps=${steps}, maxBrightness=${this._maxBrightness}`)
  • extension.js:418
    console.log(`[KbdBacklight] ASUS WMI LED (asus::kbd_backlight): ${asusLed}`)
  • extension.js:419
    console.log(`[KbdBacklight] ASUS platform (asus-nb-wmi): ${asusWmi}`)
  • extension.js:431
                console.log(`[KbdBacklight] Aura RGB: ${available} ` +
                    `(daemon=${detectAuraDaemon()}, asusctl=${detectAsusctlBinary()})`)
  • extension.js:456
    console.log(`[KbdBacklight] Set level ${clamped} (${pct}%) via GSD`)
  • extension.js:519
    console.log(`[KbdBacklight] Aura ${auraMode} #${hex} (${argv.join(' ')})`)
  • extension.js:381
    console.error(`[KbdBacklight] Could not read Steps from GSD: ${e.message}`)
  • extension.js:442
    console.error(`[KbdBacklight] read Brightness failed: ${e.message}`)
  • extension.js:458
    console.error(`[KbdBacklight] SetBrightness failed: ${e.message}`)

EGO-X-004 warning

extensions should avoid synchronous file IO in shell code

Shell code should avoid synchronous file IO APIs like `GLib.file_get_contents()` and `Gio.File.load_contents()`.

File Operations

  • hwDetect.js:33
    Gio.File.new_for_path(path).load_contents(null)

EGO-L-003 warning

signals connected by extension should be disconnected in disable()

Signals assigned in `enable()` are missing matching disconnect calls in `disable()` or its helper methods.

Disconnect all signals

  • extension.js:152
            this.menu.connect('open-state-changed', (_m, open) => {
                if (open) this._refresh();
            })

EGO-L-006 warning

preferences classes should not retain window-scoped objects on instance fields without close-request cleanup

Preferences code stores window-scoped objects on the exported prefs class without `close-request` cleanup.

Destroy all objects

  • prefs.js:593
    this._scheduleRows = this._scheduleRows.filter(r => r !== row)
  • prefs.js:603
    this._scheduleRows = this._scheduleRows.filter(r => r !== row)

All Versions

Version Status
0.5.5 (3) Unreviewed
0.5.3 (2) Active
1 Rejected

Previous Reviews on this Version

JustPerfection rejected
1. Please rename `semantic-version` to `version-name` in `metadata.json`. 2. Don't need to use any parameters for `this.getSettings()` since you already have that in `metadata.json`. 3. You cannot use subprocess for reading file content (line 40 `hwDetect.js`). 4. Remove `â€` from `hwDetect.js`. 5. Please use aysnc for reading file content since you are in shell process (line 33 `hwDetect.js`): [Gio.File.load_contents_async](https://gjs-docs.gnome.org/gio20~2.0/gio.file#method-load_contents_async) If you need any help with your extension you can ask us on: - [GNOME Extensions Matrix Channel](https://matrix.to/#/#extensions:gnome.org) - IRC Bridge: irc://irc.gimpnet.org/shell-extensions