Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow full JSON pointers in schema validation result parsing functions #186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
per1234 merged 1 commit into arduino:main from per1234:full-json-pointers
Jun 11, 2021
Merged

Allow full JSON pointers in schema validation result parsing functions #186

per1234 merged 1 commit into arduino:main from per1234:full-json-pointers
Jun 11, 2021

Conversation

Copy link
Contributor

@per1234 per1234 commented Jun 10, 2021

When used with the "properties" data format, and most especially with the flat format of the library.properties file that was an initial focus of the project's development, JSON pointers are not a terribly intuitive way to refer to a data path.

In this context, it seemed sensible to pre-fill the root prefix on the instance pointer argument of the JSON schema validation result parsing functions. However, now that those functions are being used with the JSON formatted package index data file, the requirement to omit this prefix from the JSON pointers is very confusing.

Since the argument is already a regex, it's simple to allow both styles of instance data path references.

@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jun 10, 2021
Copy link

codecov-commenter commented Jun 10, 2021
edited
Loading

Codecov Report

Merging #186 (25abd26) into main (3427584) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@
## main #186 +/- ##
=======================================
 Coverage 84.45% 84.45% 
=======================================
 Files 43 43 
 Lines 3082 3082 
=======================================
 Hits 2603 2603 
 Misses 380 380 
 Partials 99 99 
Flag Coverage Δ
unit 84.45% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/rule/schema/parsevalidationresult.go 93.25% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3427584...25abd26. Read the comment docs.

When used with the "properties" data format, and most especially with the flat format of the library.properties file that
was an initial focus of the project's development, JSON pointers are not a terribly intuitive way to refer to a data path.
In this context, it seemed sensible to pre-fill the root prefix on the instance pointer argument of the JSON schema
validation result parsing functions. However, now that those functions are being used with the JSON formatted package
index data file, the requirement to omit this prefix from the JSON pointers is very confusing.
Since the argument is already a regex, it's simple to allow both styles of instance data path references.
@per1234 per1234 merged commit 7dc9eae into arduino:main Jun 11, 2021
@per1234 per1234 deleted the full-json-pointers branch June 11, 2021 07:19
@per1234 per1234 self-assigned this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@silvanocerza silvanocerza Awaiting requested review from silvanocerza

1 more reviewer

@umbynos umbynos umbynos approved these changes

Reviewers whose approvals may not affect merge requirements
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /