1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

enforce lowercase filenames

This commit is contained in:
Jesse Duffield
2023-04-29 12:58:28 +10:00
parent aa70723e3a
commit aec46942a8
5 changed files with 16 additions and 0 deletions

14
scripts/check_filenames.sh Executable file
View File

@ -0,0 +1,14 @@
#!/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