summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-app-validate.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2015-12-30 09:43:44 +0000
committerRichard Hughes <richard@hughsie.com>2015-12-30 09:44:11 +0000
commit0c789c7623e6479e716e6a46a270080778743a5a (patch)
treea235f0f0cf9cfbff8f26162af7f1cb7269143135 /libappstream-glib/as-app-validate.c
parent6212d2eddc2d424813013be383af92388f54f9d8 (diff)
downloadappstream-glib-0c789c7623e6479e716e6a46a270080778743a5a.tar.gz
Check the project_group when validating
Fixes https://github.com/hughsie/appstream-glib/issues/73
Diffstat (limited to 'libappstream-glib/as-app-validate.c')
-rw-r--r--libappstream-glib/as-app-validate.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libappstream-glib/as-app-validate.c b/libappstream-glib/as-app-validate.c
index 87e4a10..1f87324 100644
--- a/libappstream-glib/as-app-validate.c
+++ b/libappstream-glib/as-app-validate.c
@@ -1239,6 +1239,17 @@ as_app_validate (AsApp *app, AsAppValidateFlags flags, GError **error)
}
}
+ /* project_group */
+ tmp = as_app_get_project_group (app);
+ if (tmp != NULL) {
+ if (!as_utils_is_environment_id (tmp)) {
+ ai_app_validate_add (&helper,
+ AS_PROBLEM_KIND_TAG_INVALID,
+ "<project_group> is not valid [%s]",
+ tmp);
+ }
+ }
+
/* pkgname */
if (as_app_get_pkgname_default (app) != NULL &&
as_app_get_source_kind (app) == AS_APP_SOURCE_KIND_METAINFO) {