Skip to content

Conversation

@AronNovak
Copy link
Member

Summary

  • Use file command to detect actual PHP files before linting
  • Prevents parse errors on patch files and other non-PHP content

🤖 Generated with Claude Code

Use file command to detect actual PHP files before linting, preventing
parse errors on patch files and other non-PHP content.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
php -l "$FILE"
# Only lint actual PHP files using the file command
if file "$FILE" | grep -q "PHP script"; then
echo "$FILE"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to print the file here. as php linter already includes the file name:

No syntax errors detected in web/index.php

Co-authored-by: Mariano D'Agostino <[email protected]>
@AronNovak AronNovak merged commit ab97b56 into main Oct 30, 2025
1 check passed
@AronNovak AronNovak deleted the fix-test-syntax-linting branch October 30, 2025 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants