Skip to content

Commit 62b3008

Browse files
committed
Fix broken linter rereference guards
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent 9bdf8bd commit 62b3008

18 files changed

+485
-25
lines changed

src/extension/alterschema/common/content_schema_without_media_type.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class ContentSchemaWithoutMediaType final : public SchemaTransformRule {
2121
schema.is_object() && schema.defines("contentSchema") &&
2222
!schema.defines("contentMediaType"));
2323
ONLY_CONTINUE_IF(!frame.has_references_through(
24-
location.relative_pointer.concat({"contentSchema"})));
24+
location.pointer.concat({"contentSchema"})));
2525
return APPLIES_TO_KEYWORDS("contentSchema");
2626
}
2727

src/extension/alterschema/common/else_empty.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class ElseEmpty final : public SchemaTransformRule {
2020
(schema.at("else").is_object() ||
2121
(!schema.defines("if") ||
2222
!(schema.at("if").is_boolean() && schema.at("if").to_boolean()))));
23-
ONLY_CONTINUE_IF(!frame.has_references_through(
24-
location.relative_pointer.concat({"else"})));
23+
ONLY_CONTINUE_IF(
24+
!frame.has_references_through(location.pointer.concat({"else"})));
2525
return APPLIES_TO_KEYWORDS("else");
2626
}
2727

src/extension/alterschema/common/else_without_if.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class ElseWithoutIf final : public SchemaTransformRule {
2020
Vocabularies::Known::JSON_Schema_Draft_7}) &&
2121
schema.is_object() && schema.defines("else") &&
2222
!schema.defines("if"));
23-
ONLY_CONTINUE_IF(!frame.has_references_through(
24-
location.relative_pointer.concat({"else"})));
23+
ONLY_CONTINUE_IF(
24+
!frame.has_references_through(location.pointer.concat({"else"})));
2525
return APPLIES_TO_KEYWORDS("else");
2626
}
2727

src/extension/alterschema/common/if_without_then_else.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ class IfWithoutThenElse final : public SchemaTransformRule {
2121
Vocabularies::Known::JSON_Schema_Draft_7}) &&
2222
schema.is_object() && schema.defines("if") &&
2323
!schema.defines("then") && !schema.defines("else"));
24-
ONLY_CONTINUE_IF(!frame.has_references_through(
25-
location.relative_pointer.concat({"if"})));
24+
ONLY_CONTINUE_IF(
25+
!frame.has_references_through(location.pointer.concat({"if"})));
2626
return APPLIES_TO_KEYWORDS("if");
2727
}
2828

src/extension/alterschema/common/non_applicable_additional_items.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class NonApplicableAdditionalItems final : public SchemaTransformRule {
2424
schema.is_object() && schema.defines("additionalItems"));
2525

2626
ONLY_CONTINUE_IF(!frame.has_references_through(
27-
location.relative_pointer.concat({"additionalItems"})));
27+
location.pointer.concat({"additionalItems"})));
2828

2929
if (schema.defines("items") && is_schema(schema.at("items"))) {
3030
return APPLIES_TO_KEYWORDS("additionalItems", "items");

src/extension/alterschema/common/non_applicable_type_specific_keywords.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class NonApplicableTypeSpecificKeywords final : public SchemaTransformRule {
7575
if ((metadata.instances & current_types).none()) {
7676
// Skip keywords that have references pointing to them
7777
if (frame.has_references_through(
78-
location.relative_pointer.concat({entry.first}))) {
78+
location.pointer.concat({entry.first}))) {
7979
continue;
8080
}
8181

src/extension/alterschema/common/not_false.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class NotFalse final : public SchemaTransformRule {
2020
schema.is_object() && schema.defines("not") &&
2121
schema.at("not").is_boolean() &&
2222
!schema.at("not").to_boolean());
23-
ONLY_CONTINUE_IF(!frame.has_references_through(
24-
location.relative_pointer.concat({"not"})));
23+
ONLY_CONTINUE_IF(
24+
!frame.has_references_through(location.pointer.concat({"not"})));
2525
return APPLIES_TO_KEYWORDS("not");
2626
}
2727

src/extension/alterschema/common/then_empty.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class ThenEmpty final : public SchemaTransformRule {
2020
(schema.at("then").is_object() ||
2121
(!schema.defines("if") ||
2222
!(schema.at("if").is_boolean() && schema.at("if").to_boolean()))));
23-
ONLY_CONTINUE_IF(!frame.has_references_through(
24-
location.relative_pointer.concat({"then"})));
23+
ONLY_CONTINUE_IF(
24+
!frame.has_references_through(location.pointer.concat({"then"})));
2525
return APPLIES_TO_KEYWORDS("then");
2626
}
2727

src/extension/alterschema/common/then_without_if.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class ThenWithoutIf final : public SchemaTransformRule {
2020
Vocabularies::Known::JSON_Schema_Draft_7}) &&
2121
schema.is_object() && schema.defines("then") &&
2222
!schema.defines("if"));
23-
ONLY_CONTINUE_IF(!frame.has_references_through(
24-
location.relative_pointer.concat({"then"})));
23+
ONLY_CONTINUE_IF(
24+
!frame.has_references_through(location.pointer.concat({"then"})));
2525
return APPLIES_TO_KEYWORDS("then");
2626
}
2727

src/extension/alterschema/common/unnecessary_allof_wrapper.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ class UnnecessaryAllOfWrapper final : public SchemaTransformRule {
5252
}
5353

5454
// Skip entries that have direct references pointing to them
55-
const auto entry_pointer{
56-
location.relative_pointer.concat({"allOf", index - 1})};
55+
const auto entry_pointer{location.pointer.concat({"allOf", index - 1})};
5756
if (frame.has_references_to(entry_pointer)) {
5857
continue;
5958
}

0 commit comments

Comments
 (0)