@@ -25,10 +25,9 @@ jobs:
|
||||
echo "📝 PHP 语法检查..."
|
||||
errors=0
|
||||
for file in $(find . -name "*.php" -not -path "./vendor/*"); do
|
||||
output=$(php -l "$file" 2>&1)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "错误: $file"
|
||||
echo "$output"
|
||||
if ! php -l "$file" > /dev/null 2>&1; then
|
||||
echo "❌ 语法错误: $file"
|
||||
php -l "$file" || true
|
||||
errors=$((errors + 1))
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user