8 lines
178 B
Python
8 lines
178 B
Python
|
import re
|
||
|
|
||
|
def detect_hardcoded_list(code):
|
||
|
regex = r"\[([^,\]\[]+,){2,}([^,\]\[]+)\]"
|
||
|
result = re.search(regex, code)
|
||
|
if result:
|
||
|
return True
|
||
|
return False
|