Review of "City Clock & Weather" version 1

Details Page Preview

Shows local time and current weather for multiple cities in one panel indicator. Weather data comes from Open-Meteo.

Extension Homepage
https://github.com/hwngtr/city-clock-weather

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-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

  • extension.js:501
    this._cacheFile.load_contents(null)

EGO-A-004 warning

extension files should not contain excessive ungated console logging

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

No excessive logging

  • extension.js:164
    console.warn('[city-clock-weather] Ignored malformed city settings. Check the city list in preferences.')
  • extension.js:387
    console.warn('[city-clock-weather] failed to build weather request')
  • extension.js:407
    console.warn(`[city-clock-weather] request failed: ${e}`)
  • extension.js:424
    console.warn(`[city-clock-weather] cannot launch GNOME Weather: ${e}`)
  • extension.js:494
    console.warn(`[city-clock-weather] invalid timezone for ${city.displayName}: ${e}`)
  • extension.js:521
    console.warn(`[city-clock-weather] cache write failed: ${e}`)

EGO-L-002 warning

objects created by extension should be destroyed in disable()

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

Destroy all objects

  • extension.js:269
                this._emptyLabel = new St.Label({
                    text: _('Add a city'),
                    y_align: Clutter.ActorAlign.CENTER,
                    y_expand: true,
                })
  • extension.js:336
    this._footer = new PopupMenu.PopupBaseMenuItem({reactive: false, can_focus: false})
  • extension.js:337
    this._footerLabel = new St.Label({text: '', style_class: 'popup-inactive-menu-item'})
  • extension.js:185
            this._panelBox = new St.BoxLayout({
                style_class: 'panel-status-menu-box',
                y_align: Clutter.ActorAlign.CENTER,
                y_expand: true,
            })

EGO-L-005 warning

owned object references should be released in disable()

Owned references that are cleaned up in `disable()` should also be released with `null` or `undefined`.

Destroy all objects

  • extension.js:337
    this._footerLabel = new St.Label({text: '', style_class: 'popup-inactive-menu-item'})

All Versions

Version Status
1 Unreviewed