Check file endings

main
bashrc 2026-02-05 10:35:59 +00:00
parent b3bdbca226
commit 5f1b7df5d0
1 changed files with 9 additions and 0 deletions

View File

@ -4003,6 +4003,15 @@ def check_bad_path(path: str):
print('WARN: this is not wordpress ' + path)
return True
if path_lower.endswith('.js') or \
path_lower.endswith('.php') or \
path_lower.endswith('.bak') or \
path_lower.endswith('.env') or \
path_lower.endswith('.local') or \
path_lower.endswith('.yml'):
print('WARN: bad path ' + path)
return True
if string_contains(path_lower, bad_strings):
print('WARN: bad path ' + path)
return True