Skip to content

Add JSON warning envelope for forge config --fix#14800

Open
Keemosty12 wants to merge 1 commit into
foundry-rs:masterfrom
Keemosty12:jsonfix
Open

Add JSON warning envelope for forge config --fix#14800
Keemosty12 wants to merge 1 commit into
foundry-rs:masterfrom
Keemosty12:jsonfix

Conversation

@Keemosty12
Copy link
Copy Markdown

Motivation

forge config --fix --json was still emitting warnings through stderr text output, so JSON consumers could not reliably parse warnings from the command result. This is inconsistent with the new JSON envelope direction and makes automation harder.

Solution

This change makes the --json path return warnings inside the standard JSON success envelope (warnings[]) using structured JsonMessage entries (code: config.fix), while keeping non-JSON behavior unchanged (sh_warn!).
It also adds a CLI test, config_fix_json_envelope_contains_structured_warnings, to verify the envelope shape and warning fields.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant