This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get the list of files to be committed | |
files=$(git diff --cached --name-only) | |
# Check each diff for the word 'static' | |
for file in $files; do | |
if git diff --cached "$file" | grep -q 'static'; then | |
echo "Error: The word 'static' was found in file: $file" | |
exit 1 |