1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-24 08:52:21 +02:00
lazygit/scripts/check_filenames.sh
2023-04-29 13:05:05 +10:00

15 lines
509 B
Bash
Executable File

#!/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