Skip to content

jma-weather@10yendama.com: add JMA Weather Japan applet - #8904

Open
ultrasukiyaki wants to merge 1 commit into
linuxmint:masterfrom
ultrasukiyaki:add-jma-weather-applet
Open

jma-weather@10yendama.com: add JMA Weather Japan applet#8904
ultrasukiyaki wants to merge 1 commit into
linuxmint:masterfrom
ultrasukiyaki:add-jma-weather-applet

Conversation

@ultrasukiyaki

Copy link
Copy Markdown

Summary

Adds JMA Weather Japan, a weather applet for the Cinnamon panel.

Features

  • JMA regional and weekly forecasts
  • Open-Meteo current estimates and hourly forecasts
  • Hourly precipitation amount, wind and UV
  • Japanese prefecture and municipality configuration
  • Persistent last-good cache and partial-provider fallback

Network access

  • Japan Meteorological Agency
  • Open-Meteo

Forecast requests send the selected JMA area code or coordinates needed to retrieve weather data. No analytics, advertising or user-account access is used.

Validation

Source

https://github.com/ultrasukiyaki/jma-weather-widget-for-cinnamon

@github-actions

Copy link
Copy Markdown
Contributor

Best-practices scanner

This is a regex-based check for API usage that can pose security, performance or
maintainability issues, or that may already be provided by Cinnamon. Most findings
are advisory and do not automatically disqualify a pull request.

This check is not perfect and will not replace a normal review.


Found 7 potential issue(s):

⚠️ WARNING

⚠️ sync_file_query_exists

jma-weather@10yendama.com/files/jma-weather@10yendama.com/applet.js:151

return Gio.File.new_for_path(path).query_exists(null);

query_exists() is a synchronous call that can block on slow/network filesystems.
Prefer attempting the operation and handling a Gio.IOErrorEnum.NOT_FOUND error instead.

⚠️ sync_file_get_contents

jma-weather@10yendama.com/files/jma-weather@10yendama.com/src/services/cacheService.js:38

const [ok, bytes] = GLib.file_get_contents(this.path);

Synchronous file_get_contents() blocks the main loop.
Use Gio.File.load_contents_async() instead.

⚠️ sync_file_test

jma-weather@10yendama.com/files/jma-weather@10yendama.com/src/services/cacheService.js:35

if (!GLib.file_test(this.path, GLib.FileTest.EXISTS))

file_test() is a synchronous stat call that can block on slow/network filesystems.
Prefer attempting the operation and handling a Gio.IOErrorEnum.NOT_FOUND error instead.

jma-weather@10yendama.com/files/jma-weather@10yendama.com/src/services/cacheService.js:59

if (GLib.file_test(this.path, GLib.FileTest.EXISTS))

file_test() is a synchronous stat call that can block on slow/network filesystems.
Prefer attempting the operation and handling a Gio.IOErrorEnum.NOT_FOUND error instead.

ℹ️ INFO

ℹ️ shell_string_spawn

jma-weather@10yendama.com/files/jma-weather@10yendama.com/applet.js:669

Util.spawnCommandLine(

Prefer argument vector spawn functions over shell command strings.
This is especially important when arguments include untrusted input (user data,
filenames, settings values, etc.) as shell strings are vulnerable to injection.
Static command strings are generally fine, but argv is always safer.
Use Util.spawn(["cmd", "arg1", "arg2"]) or Util.trySpawn() instead.

jma-weather@10yendama.com/files/jma-weather@10yendama.com/applet.js:675

Util.spawnCommandLine(`cinnamon-settings applets ${UUID}`);

Prefer argument vector spawn functions over shell command strings.
This is especially important when arguments include untrusted input (user data,
filenames, settings values, etc.) as shell strings are vulnerable to injection.
Static command strings are generally fine, but argv is always safer.
Use Util.spawn(["cmd", "arg1", "arg2"]) or Util.trySpawn() instead.

jma-weather@10yendama.com/files/jma-weather@10yendama.com/applet.js:680

Util.spawnCommandLine("cinnamon-settings applets");

Prefer argument vector spawn functions over shell command strings.
This is especially important when arguments include untrusted input (user data,
filenames, settings values, etc.) as shell strings are vulnerable to injection.
Static command strings are generally fine, but argv is always safer.
Use Util.spawn(["cmd", "arg1", "arg2"]) or Util.trySpawn() instead.


Automated pattern check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant