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