-
-
Notifications
You must be signed in to change notification settings - Fork 6
Linter: create rule to remove empty fragment #1825
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
Linter: create rule to remove empty fragment #1825
Conversation
Signed-off-by: karan-palan <karanpalan007@gmail.com>
ModernOfficialDialectWithEmptyFragment() | ||
: SchemaTransformRule{ | ||
"modern_official_dialect_with_empty_fragment", | ||
"The official dialect URI of Draft 2019-09 and newer versions must " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The official dialect URI of Draft 2019-09 and newer versions must " | |
"The official dialect URI of 2019-09 and newer versions must " |
We don't say draft anymore for the newer ones!
Looks good and looking forward to the tests! |
Signed-off-by: karan-palan <karanpalan007@gmail.com>
…-dialect-empty-fragment
…-dialect-empty-fragment
Signed-off-by: karan-palan <karanpalan007@gmail.com>
@jviotti , I had to make a few change in the official schema resolver to make the tests work. Ptal |
Can you send a separate PR with the official resolver changes? Also we should never be modifying the actual schemas in there, i.e. setting the |
R"EOF(@METASCHEMA_JSONSCHEMA_2020_12@)EOF"); | ||
schema.at("$id").into(sourcemeta::core::JSON{identifier}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should never mutate the official meta-schemas, as they are supposed to be immutable. What was the intention?
Ah, I see the |
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a commit to tweak the assertion instead!
No description provided.