diff --git a/.github/phplint-matcher.json b/.github/phplint-matcher.json new file mode 100644 index 000000000..38bf3cdd8 --- /dev/null +++ b/.github/phplint-matcher.json @@ -0,0 +1,16 @@ +{ + "problemMatcher": [ + { + "owner": "phplint-matcher", + "pattern": [ + { + "regexp": "^(.+):\\s+\\s+(.+) in (.+) on line (\\d+)$", + "code": 1, + "message": 2, + "file": 3, + "line": 4 + } + ] + } + ] +} diff --git a/.github/workflows/Syntax-Check.yml b/.github/workflows/Syntax-Check.yml index 8db92f6a1..2a166e1c1 100644 --- a/.github/workflows/Syntax-Check.yml +++ b/.github/workflows/Syntax-Check.yml @@ -19,9 +19,16 @@ jobs: - 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 }} - - run: php ./.github/scripts/check-php-syntax.php ./ \ No newline at end of file + - name: Lint PHP files + run: | + shopt -s globstar + for f in **/*.php; do + php -l "$f" + done