diff --git a/flatpak_builder_lint/checks/toplevel.py b/flatpak_builder_lint/checks/toplevel.py index 6abace67..0ae101eb 100644 --- a/flatpak_builder_lint/checks/toplevel.py +++ b/flatpak_builder_lint/checks/toplevel.py @@ -24,7 +24,12 @@ def check_manifest(self, manifest: dict) -> None: branch = manifest.get("branch") def_branch = manifest.get("default-branch") - if branch in ("stable", "master") or def_branch in ("stable", "master"): + + if branch not in ("stable", "beta", None) or def_branch not in ( + "stable", + "beta", + None, + ): self.errors.add("toplevel-unnecessary-branch") self.info.add( "toplevel-unnecessary-branch: Please remove the toplevel" diff --git a/tests/test_manifest.py b/tests/test_manifest.py index 7aef70d6..c2b1c339 100644 --- a/tests/test_manifest.py +++ b/tests/test_manifest.py @@ -89,7 +89,6 @@ def test_manifest_toplevel() -> None: "toplevel-no-command", "toplevel-cleanup-debug", "toplevel-no-modules", - "toplevel-unnecessary-branch", } not_founds = { @@ -101,6 +100,7 @@ def test_manifest_toplevel() -> None: found_errors = set(ret["errors"]) assert errors.issubset(found_errors) + assert "toplevel-unnecessary-branch" not in found_errors ret = run_checks("tests/manifests/base_app.json") found_errors = set(ret["errors"])