Skip to content

fix: reject unsupported lint output formats - #54

Open
FanouZeng-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:fix/lint-format-validation
Open

fix: reject unsupported lint output formats#54
FanouZeng-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:fix/lint-format-validation

Conversation

@FanouZeng-TT

Copy link
Copy Markdown
Contributor

Description

ucp-schema lint --help documents the output format as text or json, but
run_lint only checked for format == "json" and silently treated any other
value as text:

ucp-schema lint schema.json --format yaml
# exit 0, text output

That hides typos in scripts that expect machine-readable output.

Fix: reject unsupported lint output formats at the command boundary with
exit code 2 and a clear error message, while keeping text and json behavior
unchanged.

Category (Required)

  • Core Protocol: ...
  • Governance/Contributing: ...
  • Capability: ...
  • Documentation: ...
  • Infrastructure: ...
  • Maintenance: ...
  • SDK: ...
  • Samples / Conformance: ...
  • UCP Schema: Changes to the ucp-schema tool. (Requires Maintainer approval)

Related Issues

N/A

Checklist

  • I have followed the Contributing Guide ...
  • I have updated the documentation (if applicable).
  • My changes pass all local linting and formatting checks.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • (For Core/Capability) I have included/updated the relevant JSON schemas.
  • I have regenerated Python Pydantic models by running generate_models.sh under python_sdk. (Not applicable: ucp-schema CLI fix.)

Screenshots / Logs (if applicable)

N/A — cargo test --test cli_test lint_command passed 1/1 for the new test, the full Rust suite passed 316/316, and full pre-commit plus git diff --check passed.

@damaz91 damaz91 added status:needs-triage Signal that the PR is ready for human triage status:under-review and removed status:needs-triage Signal that the PR is ready for human triage labels Aug 14, 2026
@damaz91 damaz91 added status:stale-review Applied if a PR is waiting on a reviewer for too long and removed status:under-review labels Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:stale-review Applied if a PR is waiting on a reviewer for too long

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants