ci: apkbuild lint: allow all valid kconfigcheck categories
This only allowed categories that were aliases (and only categories under those), but stuff like `pmb:kconfigcheck-uefi` was flagged as an invalid option by the linting. This change parses aliases AND all categories in the kconfigcheck and allows those as options. Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7101>
This commit is contained in:
parent
6e75e62302
commit
bde9dca58c
1 changed files with 6 additions and 5 deletions
|
|
@ -21,16 +21,17 @@ custom_valid_options = [
|
|||
]
|
||||
|
||||
|
||||
def get_kconfigcheck_categories() -> None:
|
||||
def get_kconfigcheck_categories() -> list [str]:
|
||||
with open("kconfigcheck.toml", "rb") as kconfigcheck_config:
|
||||
kconfigcheck_data = tomllib.load(kconfigcheck_config)
|
||||
|
||||
kconfigcheck_categories = []
|
||||
|
||||
for alias_name in kconfigcheck_data["aliases"]:
|
||||
kconfigcheck_categories.append(f"pmb:kconfigcheck-{alias_name}")
|
||||
|
||||
for category_name in kconfigcheck_data["aliases"][alias_name]:
|
||||
for category_name in kconfigcheck_data:
|
||||
if category_name == "aliases":
|
||||
for alias_name in kconfigcheck_data["aliases"]:
|
||||
kconfigcheck_categories.append(f"pmb:kconfigcheck-{alias_name}")
|
||||
else:
|
||||
kconfigcheck_categories.append(category_name)
|
||||
|
||||
return [item.replace("category:", "pmb:kconfigcheck-") for item in kconfigcheck_categories]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue