2023-11-21 22:17:39 +01:00
|
|
|
name: PHP Mess Detector
|
2023-11-21 21:59:06 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "main" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ "main" ]
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
PHPMD:
|
2023-11-21 22:22:02 +01:00
|
|
|
name: PHPMD Scanner
|
2023-11-21 21:59:06 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
security-events: write
|
|
|
|
actions: read
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout Source Code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Setup Environment
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
2023-11-21 22:17:39 +01:00
|
|
|
php-version: "8.0"
|
2023-11-21 21:59:06 +01:00
|
|
|
coverage: none
|
|
|
|
tools: phpmd
|
|
|
|
|
|
|
|
- name: Run PHPMD
|
|
|
|
run: phpmd . sarif codesize --reportfile phpmd-results.sarif
|
|
|
|
continue-on-error: true
|
|
|
|
|
|
|
|
- name: Upload Analysis Results
|
2024-01-01 10:20:19 +01:00
|
|
|
uses: github/codeql-action/upload-sarif@v3
|
2023-11-21 21:59:06 +01:00
|
|
|
with:
|
|
|
|
sarif_file: phpmd-results.sarif
|
|
|
|
wait-for-processing: true
|