More bad paths

main
bashrc 2026-02-18 11:49:31 +00:00
parent 6961f0f327
commit f366e4ac22
1 changed files with 5 additions and 7 deletions

View File

@ -4005,13 +4005,11 @@ def check_bad_path(path: str):
print('WARN: this is not wordpress ' + path)
return True
if path_lower.endswith('.js') or \
path_lower.endswith('.py') 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'):
bad_endings = (
'.js', '.ts', '.py', '.php', '.bak', '.env', '.local', '.yml',
'.rs', '.ru'
)
if string_ends_with(path_lower, bad_endings):
print('WARN: bad path ' + path)
return True