Skip to content

Add PHP lint problem matcher #141

Add PHP lint problem matcher

Add PHP lint problem matcher #141

Workflow file for this run

name: PHP Syntax Check
on:
push:
branches: [ smf21, master ]
pull_request:
branches: [ smf21, master ]
workflow_dispatch:
jobs:
syntax-checker:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ ubuntu-latest ]
php: [ '7.4', '8.0', '8.1', '8.2' ]
name: PHP ${{ matrix.php }} Syntax Check
steps:
- uses: actions/checkout@master
with:
submodules: false
- name: Add PHP lint matcher
run: echo "::add-matcher::.github/phplint-matcher.json"
- name: Setup PHP
id: SetupPHP
uses: nanasess/setup-php@master
with:
php-version: ${{ matrix.php }}
- name: Lint PHP files
run: |
shopt -s globstar
for f in **/*.php; do
php -l "$f"
done