Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cmake/common/clang-tidy.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"Checks": "-*, bugprone-*, -bugprone-easily-swappable-parameters,-bugprone-unchecked-optional-access, concurrency-*, modernize-*, performance-*, portability-*",
"Checks": "-*,
bugprone-*,-bugprone-easily-swappable-parameters,
concurrency-*,
modernize-*,
performance-*,
portability-*",
"WarningsAsErrors": "*",
"FormatStyle": "none",
"UseColor": true
Expand Down
2 changes: 2 additions & 0 deletions src/core/jsonschema/jsonschema.cc
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ auto sourcemeta::core::reference_visit(
assert(property.second.is_string());
assert(walker_result.vocabulary.has_value());
sourcemeta::core::URI reference{property.second.to_string()};
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
callback(subschema, base, walker_result.vocabulary.value(),
property.first, reference);
}
Expand Down Expand Up @@ -685,6 +686,7 @@ auto sourcemeta::core::unidentify(
}

assert(entry.base_dialect.has_value());
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
sourcemeta::core::anonymize(subschema, entry.base_dialect.value());

if (entry.vocabularies.contains(
Expand Down
3 changes: 3 additions & 0 deletions src/core/jsonschema/walker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ auto walk(const std::optional<sourcemeta::core::Pointer> &parent,
sourcemeta::core::SchemaIdentificationStrategy::Strict,
maybe_current_dialect)};
const auto is_schema_resource{level == 0 || id.has_value()};
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
const auto current_dialect{is_schema_resource ? maybe_current_dialect.value()
: dialect};
const auto current_base_dialect{
Expand Down Expand Up @@ -422,6 +423,7 @@ sourcemeta::core::SchemaIterator::SchemaIterator(
assert(base_dialect.has_value());
walk(std::nullopt, pointer, instance_location, instance_location,
this->subschemas, schema, walker, resolver, dialect.value(),
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
base_dialect.value(), SchemaWalkerType_t::Deep, 0, false);
}
}
Expand All @@ -441,6 +443,7 @@ sourcemeta::core::SchemaIteratorFlat::SchemaIteratorFlat(
assert(base_dialect.has_value());
walk(std::nullopt, pointer, instance_location, instance_location,
this->subschemas, schema, walker, resolver, dialect.value(),
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
base_dialect.value(), SchemaWalkerType_t::Flat, 0, false);
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/core/uri/uri.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,14 @@ auto URI::parse() -> void {
if (this->is_urn() || this->is_tag()) {
const auto part{uri_text_range(&segment->text)};
assert(part.has_value());
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
path << part.value();
} else {
bool first{true};
while (segment) {
const auto part{uri_text_range(&segment->text)};
assert(part.has_value());
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
const auto value{part.value()};

if (first) {
Expand Down
Loading