✨ Add JSONC language support for comment parsing and traceability#70
Merged
Conversation
Contributor
Author
|
comment type is intentionally jsonc, to allow future extensions for json with definition of fields to use |
5b9845e to
16895cc
Compare
16895cc to
f1fa8a0
Compare
Contributor
Author
|
rebased the PR, previous test failures from the approved workflow don't seem to be related to the PR |
f1fa8a0 to
23c7fac
Compare
Adds jsonc language support, also checks .json files if they start with a comment (see jsonc.org). Signed-off-by: Florian Roks <florian.roks@mercedes-benz.com>
The JSONC row added the continuation cells one space too deep and re-indented the existing Go row the same way, so both rows' cells sat at column 6 under a `* -` whose first cell is at column 5. docutils no longer saw a uniform two-level bullet list, failing the directive: configuration.rst: ERROR: Error parsing content block for the "list-table" directive: two-level bullet list expected, but row 7 does not contain a second-level bullet list. Under `sphinx-build -nW` (the `docs` CI job) this broke the build. Dedent both rows' cells to column 5, matching every other row.
dbee348 to
f90c593
Compare
SCOPE_NODE_TYPES is read only by find_next_scope / find_enclosing_scope, which are reached for cpp/python/cs/rust/go. YAML and JSONC return early from find_associated_scope into their own find_*_associated_structure finders (data formats associate a comment with the surrounding pair / item / scalar, not an enclosing or following declaration), so their dict entries were never read. Remove them and document why they are absent. The JSONC entry only hosted the IMPL_JSONC_2 traceability marker, so move that marker onto find_jsonc_associated_structure, which is the actual implementation it describes. No behaviour change; YAML/JSONC association tests unaffected.
ubmarco
approved these changes
Jun 20, 2026
ubmarco
left a comment
Member
There was a problem hiding this comment.
Thanks for the PR & the efforts you put in!
Added some things, good to merge now.
bburda
approved these changes
Jun 20, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds jsonc language support, also checks .json files if they start with a comment (see jsonc.org).
Florian Roks <florian.roks@mercedes-benz.com>, Mercedes-Benz Tech Innovation GmbH
Provider Information