fix: escape lint diagnostic pointers - #65
Conversation
|
Hi @FanouZeng-TT, Thank you for all these great bug fixes and improvements to To help streamline the review and merge process, and to avoid CI overhead and merge conflicts across sibling PRs touching the same files, would you mind grouping related micro-changes into single, cohesive PRs in the future? For example, related changes can be combined as follows:
Bundling related fixes this way makes it much easier and faster for maintainers to review, approve, and merge your PRs in one go without waiting on multiple individual CI pipelines. Thanks again for your contributions! |
|
Understood. I’ll group related changes by subsystem going forward rather than opening separate micro-PRs that touch the same files. Thanks for the concrete grouping guidance. |
Description
Diagnostic.pathvalues use JSON Pointer-style/tokenpaths, but object keys were appended without RFC 6901 escaping. A property nameda/b~ctherefore produced diagnostics such as/properties/a/b~c/ucp_request, which splits one property token into multiple levels and leaves an invalid~cescape.Fix: escape dynamic object-key path tokens with
~0and~1before appending them. Array indexes and fixed keywords keep their existing spelling. The regression test coversE002,E004, andE008diagnostics for keys containing both/and~.Category (Required)
Related Issues
N/A
Checklist
generate_models.shunderpython_sdk(not applicable).Screenshots / Logs (if applicable)
N/A — verified with
cargo test --all-targets,cargo clippy --all-targets -- -D warnings,cargo fmt --check, all pre-commit hooks, andgit diff --check.