Skip to content

Use proper diff output on fmt --check - #825

Merged
jviotti merged 2 commits into
mainfrom
diff-fmt-check
Aug 16, 2026
Merged

Use proper diff output on fmt --check#825
jviotti merged 2 commits into
mainfrom
diff-fmt-check

Conversation

@jviotti

@jviotti jviotti commented Aug 16, 2026

Copy link
Copy Markdown
Member

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

Review in cubic

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@augmentcode

augmentcode Bot commented Aug 16, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR enhances jsonschema fmt --check failure reporting with content diffs.

Changes:

  • Links the CLI target against Sourcemeta Core's diff library.
  • Computes a line-based Myers diff between the current and formatted document.
  • Prints unified diff output to stderr for non-JSON check failures.
  • Replaces JSON error-path strings with objects containing a path and structured diff operations.
  • Serializes equal, deleted, and inserted line groups for JSON output.
  • Shares reporting logic between stdin and file-based formatting checks.
  • Updates single-file, multi-file, test-document, indentation, and stdin fixtures.
Technical notes: Expected formatting remains generated by the existing formatter; this change only alters failed-check diagnostics and the failure JSON shape.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread src/command_fmt.cc

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 11 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/command_fmt.cc Outdated
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti
jviotti merged commit b38bab9 into main Aug 16, 2026
16 checks passed
@jviotti
jviotti deleted the diff-fmt-check branch August 16, 2026 15:17
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