Skip to content

Commit

Permalink
Skip finish-args-not-defined for extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
bbhtt authored and barthalion committed Nov 28, 2023
1 parent d47ac5c commit 83610e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion flatpak_builder_lint/checks/finish_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ def check_build(self, path: str) -> None:
else:
is_baseapp = False

is_extension = metadata.get("extension")

permissions = metadata.get("permissions", {})
if not permissions and not is_baseapp:
if not permissions and not (is_baseapp or is_extension):
self.errors.add("finish-args-not-defined")
return

Expand Down
6 changes: 2 additions & 4 deletions tests/test_builddir.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ def run_checks(filename: str) -> dict:
def test_builddir_appid() -> None:
errors = {
'appid-ends-with-lowercase-desktop',
'appid-uses-code-hosting-domain',
'finish-args-not-defined'
'appid-uses-code-hosting-domain'
}
ret = run_checks("tests/builddir/appid")
found_errors = set(ret["errors"])
Expand Down Expand Up @@ -81,8 +80,7 @@ def test_builddir_baseapp() -> None:
def test_builddir_extension() -> None:
errors = {
"appstream-missing-appinfo-file",
"appstream-metainfo-missing",
"finish-args-not-defined"
"appstream-metainfo-missing"
}

ret = run_checks("tests/builddir/extension")
Expand Down

0 comments on commit 83610e6

Please sign in to comment.