mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
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.
This commit is contained in:
parent
7e1881263d
commit
ffabdee953
|
@ -17,7 +17,7 @@ def parse_config_variables(lines):
|
||||||
return matches
|
return matches
|
||||||
|
|
||||||
def generate_regex(variable_code):
|
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):
|
def find_config_variables(config_variables):
|
||||||
"""Returns the config variables which were not found."""
|
"""Returns the config variables which were not found."""
|
||||||
|
|
Loading…
Reference in a new issue