Skip to content

Commit

Permalink
Throw as many warnings as incorrect tags
Browse files Browse the repository at this point in the history
Signed-off-by: tempate <[email protected]>
  • Loading branch information
Tempate committed Apr 11, 2024
1 parent 3eb843b commit 3faa61e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ddspipe_yaml/src/cpp/YamlValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,20 @@ bool YamlValidator::validate_tags(
}

// Check if there are any extra tags that are not in either list
bool has_extra_tags = false;

for (const auto& tag_it : yml)
{
const auto& tag = tag_it.first.as<TagType>();

if (!tags.count(tag))
{
logWarning(DDSPIPE_YAML, "Tag <" << tag << "> is not a valid tag.");
return false;
has_extra_tags = true;
}
}

return true;
return !has_extra_tags;
}

} /* namespace yaml */
Expand Down

0 comments on commit 3faa61e

Please sign in to comment.