hughsie / appstream-glib

This library provides objects and helper methods to help reading and writing AppStream metadata.
GNU Lesser General Public License v2.1
65 stars 103 forks source link

as-app: Print name of unknown app metadata tags #470

Closed sidt4 closed 1 year ago

sidt4 commented 1 year ago

Currently, we just get a "XML data contains unknown tag" error message, without the actual tag name when running "appstream-util validate-strict".

$ appstream-util validate-strict --nonet org.gnome.Nautilus.appdata.xml org.gnome.Nautilus.appdata.xml: FAILED:
..
• tag-invalid           : XML data contains unknown tag
..
Validation of files failed

With this commit, we now display a warning for each unknown tag.

(appstream-util:289727): As-WARNING **: 14:12:10.446: Unknown tag: <recommends>
hughsie commented 1 year ago

I don't think g_warning is a good idea to show the user -- and in general I think appstreamcli does a much better job anyway.

sidt4 commented 1 year ago

Okay.