From e3c8b1c5273e20a6c20b5ba923cdcea919340950 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 21 May 2018 17:25:00 +0300 Subject: Add validate_package_name() function, validate manifest package names --- libbpkg/manifest.hxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libbpkg/manifest.hxx') diff --git a/libbpkg/manifest.hxx b/libbpkg/manifest.hxx index f1e031e..97239db 100644 --- a/libbpkg/manifest.hxx +++ b/libbpkg/manifest.hxx @@ -376,6 +376,13 @@ namespace bpkg comment (std::move (c)) {} }; + // Check if the package name complies with the specification (see the bpkg + // manual for details) and throw std::invalid_argument if that's not the + // case. + // + LIBBPKG_EXPORT void + validate_package_name (const std::string&); + class LIBBPKG_EXPORT package_manifest { public: -- cgit v1.1