From 5c16e46faa96b0ae2f0254896fad440576207f40 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Wed, 22 Jan 2025 22:59:43 +0100 Subject: [PATCH] Check that the json files are well-formed i.e. they have the same number of keys than of mimetypes --- .gitlab-ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cb5dd59..32cdc10 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,3 +10,11 @@ include: - /gitlab-templates/android-qt6.yml - /gitlab-templates/freebsd-qt6.yml - /gitlab-templates/windows-qt6.yml + +image_json_validate: + stage: validate + image: invent-registry.kde.org/sysadmin/ci-images/suse-qt68:latest + tags: + - Linux + script: + - find src/imageformats/ -name *.json \( -print -a -exec jq -e '(.Keys | type == "array") and (.MimeTypes | type == "array") and (.MimeTypes | length) == (.Keys | length)' {} \; -o -quit \)