1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-07 20:37:35 +00:00

Meta: Check port property for ports in the linter

We now make sure the directory name and `port` property are identical.
This commit is contained in:
Jelle Raaijmakers 2022-04-03 13:29:20 +02:00 committed by Linus Groh
parent d53c602e11
commit 31b72c20f0

View file

@ -193,7 +193,6 @@ def get_port_properties(port):
dict: keys are values from PORT_PROPERTIES, values are from the package.sh file
"""
props = {}
package_sh_command = f"./package.sh showproperty {' '.join(PORT_PROPERTIES)}"
res = subprocess.run(f"cd {port}; exec {package_sh_command}", shell=True, capture_output=True)
if res.returncode == 0:
@ -224,6 +223,11 @@ def check_package_files(ports):
if not os.path.exists(package_file):
continue
props = ports[port]
if props['port'] != port:
print(f"Ports/{port} should use '{port}' for 'port' but is using '{props['port']}' instead")
all_good = False
if not props['auth_type'] in ('sha256', 'sig', ''):
print(f"Ports/{port} uses invalid signature algorithm '{props['auth_type']}' for 'auth_type'")
all_good = False