flathub-infra / flatpak-builder-lint

A linter for flatpak-builder manifests
MIT License
48 stars 125 forks source link

Possible to run flatpak-builder-lint only to lint the metainfo? #295

Closed cbm755 closed 6 months ago

cbm755 commented 6 months ago

The docs say this:

flatpak install -y flathub org.flatpak.Builder
flatpak run --command=appstream-util org.flatpak.Builder validate tld.domain.appid.metainfo.xml

But this seems to just be the standard appstream-util:

flatpak run --command=appstream-util org.flatpak.Builder --version
Version:    0.8.2

So it doesn't catch the extra things that this (new?) linter is catching (e.g. https://github.com/flathub/org.plomgrading.PlomClient/issues/110)


So is it possible to run the new metadata validator "offline" (like without an entire build), just to validate the metainfo? E.g., in my upstream CI.

cbm755 commented 6 months ago

Somewhat answering my own question... I can do this:

flatpak-builder-lint manifest  org.plomgrading.PlomClient.yaml

So maybe this is really a feature request for something like:

flatpak-builder-lint metainfo org.foo.bar.metainfo.xml
bbhtt commented 6 months ago

The doc was updated a few hours ago https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines/#validation

Appstream-util is no longer used.

Anyway we were talking about this just today, so something like a subcommand to just validate metainfo should be made available.

bbhtt commented 6 months ago

Added in https://github.com/flathub-infra/flatpak-builder-lint/commit/c09ab63895e817d9214a0fb75afe21823f0f589a