Skip to content

Commit 2670af4

Browse files
committed
.
1 parent 7873d7c commit 2670af4

2 files changed

Lines changed: 37 additions & 141 deletions

File tree

.github/workflows/install-syslog-cacti.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ jobs:
187187
exit 1
188188
fi
189189
190+
190191
- name: Run Cacti Poller
191192
run: |
192193
cd ${{ github.workspace }}/cacti
@@ -232,3 +233,39 @@ jobs:
232233
echo "=== Cacti Log ==="
233234
sudo cat ${{ github.workspace }}/cacti/log/cacti.log
234235
fi
236+
237+
238+
- name: Create PHPStan config
239+
run: |
240+
cd ${{ github.workspace }}/cacti/plugins/syslog
241+
cat > phpstan.neon << 'EOF'
242+
parameters:
243+
level: 5
244+
paths:
245+
- .
246+
excludePaths:
247+
- vendor/
248+
- locales/
249+
ignoreErrors:
250+
- '#Function db_[a-z_]+ not found\.#'
251+
- '#Function cacti_[a-z_]+ not found\.#'
252+
- '#has invalid return type the\.#'
253+
- '#Class [a-zA-Z_\\]+ not found\.#'
254+
bootstrapFiles:
255+
- ../../include/global.php
256+
EOF
257+
258+
- name: Install PHPStan
259+
run: |
260+
cd ${{ github.workspace }}/cacti/plugins/syslog
261+
composer require --dev phpstan/phpstan --with-all-dependencies || composer global require phpstan/phpstan
262+
263+
- name: Run PHPStan Analysis
264+
run: |
265+
cd ${{ github.workspace }}/cacti/plugins/syslog
266+
if [ -f vendor/bin/phpstan ]; then
267+
vendor/bin/phpstan analyse --no-progress --error-format=github || true
268+
else
269+
phpstan analyse --no-progress --error-format=github || true
270+
fi
271+
continue-on-error: true

.github/workflows/phpstan.yml

Lines changed: 0 additions & 141 deletions
This file was deleted.

0 commit comments

Comments
 (0)