appstream icon indicating copy to clipboard operation
appstream copied to clipboard

Newlines in XML tags breaks `appstreamcli validate`

Open hwittenborn opened this issue 1 year ago • 0 comments

In my project, I have a MetaInfo file that gets automatically generated through BeautifulSoup. BeautifulSoup is outputting newlines in certain elements, and this appears to be breaking appstreamcli validate:

I: com.hunterwittenborn.Celeste:4: cid-maybe-not-rdns
     
             com.hunterwittenborn.Celeste
         
E: com.hunterwittenborn.Celeste:4: cid-invalid-character
     
             com.hunterwittenborn.Celeste
         : '
     '
E: com.hunterwittenborn.Celeste:4: cid-invalid-character
     
             com.hunterwittenborn.Celeste
         : ' '
I: com.hunterwittenborn.Celeste:10: developer-name-tag-deprecated
E: com.hunterwittenborn.Celeste:16: metadata-license-invalid 
        CC0-1.0
    
W: com.hunterwittenborn.Celeste:19: spdx-license-unknown GPL-3.0+
I: com.hunterwittenborn.Celeste:~: developer-info-missing

✘ Validation failed: errors: 3, warnings: 1, infos: 3, pedantic: 1

Removing the newlines on the tags for id, metadata_license, and project_license fixes the issue. Using other XML parsing tools doesn't include the newlines that appear to be causing the issue here, so I'm assuming such shouldn't be happening.

I found the issue when using flatpak-builder-lint, but it looks like they recommended filing an issue here.

hwittenborn avatar Jun 22 '24 18:06 hwittenborn