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