33from collections import defaultdict
44from dataclasses import dataclass
55from fnmatch import fnmatch
6+ from pathlib import Path
67from typing import DefaultDict , Dict , Set
78
89LINUX = "ubuntu-latest"
@@ -35,15 +36,6 @@ class LanguageInfo:
3536 "repo-config.yml" ,
3637 "scripts/get_codeql_languages.py" ,
3738 "scripts/build_codeql_language.py" ,
38- "archive/c/c/testinfo.yml" ,
39- "archive/c/c-plus-plus/testinfo.yml" ,
40- "archive/c/c-sharp/testinfo.yml" ,
41- "archive/g/go/testinfo.yml" ,
42- "archive/j/java/testinfo.yml" ,
43- "archive/j/javascript/testinfo.yml" ,
44- "archive/k/kotlin/testinfo.yml" ,
45- "archive/r/ruby/testinfo.yml" ,
46- "archive/t/typescript/testinfo.yml" ,
4739 "pyproject.toml" ,
4840 "poetry.lock" ,
4941}
@@ -66,7 +58,8 @@ def main():
6658 else :
6759 for changed_path in parsed_args .files_changed :
6860 for glob , language_info in CODEQL_LANGUAGES .items ():
69- if fnmatch (changed_path , glob ):
61+ testinfo_path = str (Path (glob ).parent / "testinfo.yml" )
62+ if fnmatch (changed_path , glob ) or changed_path == testinfo_path :
7063 languages .add (language_info )
7164 language_paths [language_info .language ].add (glob )
7265 break
0 commit comments