Skip to content

Add JSON output to config check - #383

Merged
jongio merged 2 commits into
mainfrom
idea/config-check-json
Jul 31, 2026
Merged

Add JSON output to config check#383
jongio merged 2 commits into
mainfrom
idea/config-check-json

Conversation

@jongio

@jongio jongio commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Closes #378

Adds grut config check --json for setup scripts that need a stable config validation report.

Changes:

  • Reports ok, config_path, load errors, and keybinding conflicts as JSON.
  • Keeps the existing text output by default.
  • Keeps failure cases exiting non-zero.

Validation:

  • go build ./...
  • go test ./cmd -run ConfigCheck -count=1
  • go test ./... -count=1
  • mage preflight was attempted. It is blocked by WSL tests where git is not available in the WSL PATH.

Closes #378

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3f892a21-0f5d-41e7-aebb-afbda057615d
@jongio jongio added the idea Feature idea from the idea pipeline label Jul 26, 2026
@jongio jongio self-assigned this Jul 26, 2026
The JSON refactor dropped the "Config: <path>" line from the text
output when loadKeymap returns an error, which the previous
checkKeybindings always printed. Restore the else branch so it matches
the sibling config-load-error path in the same function.

Adds a regression test that fails without the fix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 951180a3-9772-4cf6-8e49-372d43653508
@jongio
jongio merged commit 1fcc295 into main Jul 31, 2026
4 checks passed
@jongio
jongio deleted the idea/config-check-json branch July 31, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

idea Feature idea from the idea pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add JSON output to config check

1 participant