From 8696f72f7736d250e1b2985ab5321fe3cf0bd677 Mon Sep 17 00:00:00 2001 From: lethosor Date: Wed, 11 May 2022 01:06:47 -0400 Subject: [PATCH] Fix script-docs.py extension check The check previously matched any filename ending in `lua`, not `.lua`. This caused failures in my fork because I had a branch ending in `-lua`, which created a file of that name in `.git/refs` that was not a valid Lua script. For extra good measure, anything under `.git` is ignored now as well. --- ci/script-docs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/script-docs.py b/ci/script-docs.py index 71d7f37b2..7ef287f8a 100755 --- a/ci/script-docs.py +++ b/ci/script-docs.py @@ -81,11 +81,11 @@ def check_file(fname): def main(): """Check that all DFHack scripts include documentation""" err = 0 - exclude = set(['internal', 'test']) + exclude = {'.git', 'internal', 'test'} for root, dirs, files in os.walk(SCRIPT_PATH, topdown=True): dirs[:] = [d for d in dirs if d not in exclude] for f in files: - if f[-3:] in {'.rb', 'lua'}: + if f.split('.')[-1] in {'rb', 'lua'}: err += check_file(join(root, f)) return err