/
githubmirror
/
lazygit
Обзор
Документация
Войти
/
githubmirror
/
lazygit
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
scripts/check_filenames.sh
14 строк
509 B
Jesse Duffield
enforce lowercase filenames
29 апр 2023, 06:05
29 апр 2023, 06:05
aec4694
Код
Авторство
О чём код?
#!/bin/bash # Find all Go files in the project directory and its subdirectories, except in the vendor directory for file in $(find . -name "*.go" -not -path "./vendor/*"); do # Check if the file name contains uppercase letters if [[ "$file" =~ [A-Z] ]]; then echo "Error: $file contains uppercase letters. All Go files in the project (excluding vendor directory) must use snake_case" exit 1 fi done echo "All Go files in the project (excluding vendor directory) use lowercase letters" exit 0