From 1eba5c660fad18f626480373d2245ed35798bc2d Mon Sep 17 00:00:00 2001 From: sksat Date: Thu, 21 Sep 2023 16:09:26 +0900 Subject: [PATCH] fix empty dirname bug --- script/ci/check_coding_rule.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/script/ci/check_coding_rule.py b/script/ci/check_coding_rule.py index 1809fae2f..e1524db24 100644 --- a/script/ci/check_coding_rule.py +++ b/script/ci/check_coding_rule.py @@ -59,7 +59,10 @@ def main(): print("WARNING: " + rule_name + " rule is ignored!!") settings["check_funcs"] = check_funcs # ここだけ, settings に追記している - check_root_dir = os.path.dirname(setting_file_path) + r"/" + dname = os.path.dirname(setting_file_path) + if not dname: + dname = os.getcwd() + check_root_dir = dname + r"/" if not check_coding_rule(check_root_dir, settings): print("The above files are invalid coding rule.")