From ffabdee95396f0e44b754f99c5b34bb3b0403b5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Fri, 13 Sep 2024 21:34:41 +0200 Subject: [PATCH] Fix some unused config variables not being detected Unused config variables were not detected if they were the prefix of a longer config variable which is used. --- scripts/check_config_variables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check_config_variables.py b/scripts/check_config_variables.py index 603f1494e..9f38fade7 100755 --- a/scripts/check_config_variables.py +++ b/scripts/check_config_variables.py @@ -17,7 +17,7 @@ def parse_config_variables(lines): return matches def generate_regex(variable_code): - return fr'(g_Config\.m_{variable_code}|Config\(\)->m_{variable_code}|m_pConfig->m_{variable_code})' + return fr'(g_Config\.m_{variable_code}\b|Config\(\)->m_{variable_code}\b|m_pConfig->m_{variable_code}\b)' def find_config_variables(config_variables): """Returns the config variables which were not found."""