Skip to content

Commit

Permalink
appid: Exclude Devel suffixes from domain check
Browse files Browse the repository at this point in the history
when an extra devel suffix gets added to the original appid, the
rDNS check will take in all components of the appid but their might not
be a webpage available there. So standardise on the `Devel` suffix
and skip on that.

Devel is not to be allowed on Flathub submission, submission reviews
need to take note of that
  • Loading branch information
bbhtt committed Jul 3, 2024
1 parent 78aedf9 commit 94efccc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flatpak_builder_lint/checks/appid.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ def _validate(self, appid: Optional[str], is_extension: bool) -> None:
if appid:
if is_extension or is_baseapp:
return
if split[-1] == "Devel":
return
if domainutils.is_app_on_flathub(appid):
return
if appid.startswith(domainutils.code_hosts):
Expand Down
13 changes: 13 additions & 0 deletions tests/manifests/domain_checks/ch.wwwwww.bar.Devel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"app-id": "ch.wwwwww.bar.Devel",
"runtime": "foo",
"sdk": "bar",
"command": "foo",
"finish-args": ["--foo=bar"],
"modules": [
{
"name": "module2",
"buildsystem": "autotools"
}
]
}
5 changes: 5 additions & 0 deletions tests/test_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ def test_appid_too_many_cpts() -> None:
assert {"appid-too-many-components-for-app"} == errors


def test_appid_devel_skip() -> None:
ret = run_checks("tests/manifests/domain_checks/ch.wwwwww.bar.Devel.json")
assert "errors" not in ret


def test_appid_url_not_reachable() -> None:
for i in (
"tests/manifests/domain_checks/io.github.wwwwwwwwwwwww.bar.json",
Expand Down

0 comments on commit 94efccc

Please sign in to comment.