trivial: check-license: ignore subprojects too

This commit is contained in:
Mario Limonciello 2021-08-08 19:44:33 -05:00
parent 1384e94c64
commit 0114c9ada7

View File

@ -21,7 +21,7 @@ def __get_license(fn: str) -> str:
def test_files() -> int: def test_files() -> int:
rc: int = 0 rc: int = 0
ignore = "" build_dir = ""
for fn in glob.glob("**/*.[c|h|py|sh]", recursive=True): for fn in glob.glob("**/*.[c|h|py|sh]", recursive=True):
if "meson-private" in fn: if "meson-private" in fn:
@ -29,9 +29,11 @@ def test_files() -> int:
if os.path.isdir(fn): if os.path.isdir(fn):
continue continue
if "config.h" in fn: if "config.h" in fn:
ignore = os.path.dirname(fn) build_dir = os.path.dirname(fn)
continue continue
if fn.startswith(ignore): if build_dir and fn.startswith(build_dir):
continue
if fn.startswith("subprojects"):
continue continue
lic = __get_license(fn) lic = __get_license(fn)
if not lic: if not lic: