check-json fails on the JSONC launch.json and an empty Unity Settings.json #33

Closed
opened 2026-08-20 07:10:22 +00:00 by coilyco-ops · 0 comments
Member

After #31 (the four catalog hooks) and the shell-script LF pin (b4590c1, shellcheck), pre-commit run --all-files has one hook left red: check-json. Two files, both pre-existing and platform-independent (they fail on Linux too, not only on a Windows checkout).

1. mods/.vscode/launch.json is JSONC

The file carries // line comments, which VS Code accepts for launch.json but strict JSON does not. check-json from pre-commit-hooks parses strict JSON and fails:

mods/.vscode/launch.json: Failed to json decode (Expecting property name enclosed in double quotes: line 5 column 7)

Standard fix: exclude .vscode/ from check-json in .pre-commit-config.yaml (VS Code config is JSONC by design), or switch that path to a JSONC-aware check.

2. unity/ProjectSettings/Packages/com.unity.services.core/Settings.json is empty

The file is 0 bytes, so any JSON parser fails at char 0:

unity/ProjectSettings/.../Settings.json: Failed to json decode (Expecting value: line 1 column 1 (char 0))

This is a Unity-generated stub. Either exclude the Unity ProjectSettings/ tree from check-json (Unity owns those files), or replace the empty file with {} if the package expects a config object.

Scope note

check-json is a pre-commit-hooks hook, not an agentic-os catalog hook, so it sat outside #31 and the shellcheck LF pin. This is the last hook keeping pre-commit run --all-files from green.

Done means

pre-commit run --all-files green.

  • #31 the four catalog hooks (fixed)
  • #7 make the consolidated pre-commit config root-aware
After #31 (the four catalog hooks) and the shell-script LF pin (`b4590c1`, shellcheck), `pre-commit run --all-files` has one hook left red: `check-json`. Two files, both pre-existing and platform-independent (they fail on Linux too, not only on a Windows checkout). ## 1. mods/.vscode/launch.json is JSONC The file carries `//` line comments, which VS Code accepts for `launch.json` but strict JSON does not. `check-json` from pre-commit-hooks parses strict JSON and fails: ``` mods/.vscode/launch.json: Failed to json decode (Expecting property name enclosed in double quotes: line 5 column 7) ``` Standard fix: exclude `.vscode/` from `check-json` in `.pre-commit-config.yaml` (VS Code config is JSONC by design), or switch that path to a JSONC-aware check. ## 2. unity/ProjectSettings/Packages/com.unity.services.core/Settings.json is empty The file is 0 bytes, so any JSON parser fails at char 0: ``` unity/ProjectSettings/.../Settings.json: Failed to json decode (Expecting value: line 1 column 1 (char 0)) ``` This is a Unity-generated stub. Either exclude the Unity `ProjectSettings/` tree from `check-json` (Unity owns those files), or replace the empty file with `{}` if the package expects a config object. ## Scope note `check-json` is a pre-commit-hooks hook, not an agentic-os catalog hook, so it sat outside #31 and the shellcheck LF pin. This is the last hook keeping `pre-commit run --all-files` from green. ## Done means `pre-commit run --all-files` green. ## Related * #31 the four catalog hooks (fixed) * #7 make the consolidated pre-commit config root-aware
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-gaming/eco-mods#33
No description provided.