summaryrefslogtreecommitdiffstats
path: root/testing/languages
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-19 09:39:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-19 09:39:56 +0000
commitf2da78ab588a3ec60c35610b28176af14477b392 (patch)
tree77a67bf7f88e1f361e6dd8133a88bb5ddb38d01d /testing/languages
parentReleasing debian version 3.3.1-1. (diff)
downloadpre-commit-f2da78ab588a3ec60c35610b28176af14477b392.tar.xz
pre-commit-f2da78ab588a3ec60c35610b28176af14477b392.zip
Merging upstream version 3.3.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/languages')
-rwxr-xr-xtesting/languages15
1 files changed, 14 insertions, 1 deletions
diff --git a/testing/languages b/testing/languages
index 5e8fc9e..f4804c7 100755
--- a/testing/languages
+++ b/testing/languages
@@ -16,6 +16,15 @@ EXCLUDED = frozenset((
))
+def _always_run() -> frozenset[str]:
+ ret = ['.github/workflows/languages.yaml', 'testing/languages']
+ ret.extend(
+ os.path.join('pre_commit/resources', fname)
+ for fname in os.listdir('pre_commit/resources')
+ )
+ return frozenset(ret)
+
+
def _lang_files(lang: str) -> frozenset[str]:
prog = f'''\
import json
@@ -47,10 +56,14 @@ def main() -> int:
if fname.endswith('.py') and fname != '__init__.py'
]
+ triggers_all = _always_run()
+ for fname in triggers_all:
+ assert os.path.exists(fname), fname
+
if not args.all:
with concurrent.futures.ThreadPoolExecutor(os.cpu_count()) as exe:
by_lang = {
- lang: files
+ lang: files | triggers_all
for lang, files in zip(langs, exe.map(_lang_files, langs))
}