diff --git a/ci-scripts/test_syntax.sh b/ci-scripts/test_syntax.sh index 096a2ee6a..2b089ca63 100755 --- a/ci-scripts/test_syntax.sh +++ b/ci-scripts/test_syntax.sh @@ -11,8 +11,10 @@ FILES=$(git diff-tree --no-commit-id --name-only -r HEAD | grep -v yml$) for FILE in $FILES do - echo "$FILE" if [ -f "$FILE" ]; then - php -l "$FILE" + # Only lint actual PHP files using the file command + if file "$FILE" | grep -q "PHP script"; then + php -l "$FILE" + fi fi done