Skip to content

Commit 21aa366

Browse files
committed
Add PHP lint problem matcher
Signed-off-by: John Rayes <live627@gmail.com>
1 parent 006987c commit 21aa366

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

.github/phplint-matcher.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "phplint-matcher",
5+
"pattern": [
6+
{
7+
"regexp": "^(.+):\\s+\\s+(.+) in (.+) on line (\\d+)$",
8+
"code": 1,
9+
"message": 2,
10+
"file": 3,
11+
"line": 4
12+
}
13+
]
14+
}
15+
]
16+
}

.github/workflows/Syntax-Check.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@ jobs:
1919
- uses: actions/checkout@master
2020
with:
2121
submodules: false
22+
- name: Add PHP lint matcher
23+
run: echo "::add-matcher::.github/phplint-matcher.json"
2224
- name: Setup PHP
2325
id: SetupPHP
2426
uses: nanasess/setup-php@master
2527
with:
2628
php-version: ${{ matrix.php }}
27-
- run: php ./.github/scripts/check-php-syntax.php ./
29+
- name: Lint PHP files
30+
run: |
31+
shopt -s globstar
32+
for f in **/*.php; do
33+
php -l "$f"
34+
done

0 commit comments

Comments
 (0)