Skip to content

Commit

Permalink
Create PHPMD.yml
Browse files Browse the repository at this point in the history
PHPMD takes a given PHP source code base and looks for several potential problems within that source. These problems can be things like:
- Possible bugs
- Suboptimal code
- Overcomplicated expressions
- Unused parameters, methods, properties
  • Loading branch information
danijelgalic committed Nov 4, 2024
1 parent cea79cf commit a0627a3
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/PHPMD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: PHP Mess Detector
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
permissions:
contents: read
jobs:
PHPMD:
name: Run PHPMD scanning
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@2.3.1
with:
php-version: 8.3
coverage: none
tools: phpmd
- name: Run PHPMD
run: phpmd . sarif phpmd.xml --reportfile phpmd-results.sarif
continue-on-error: true
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v3.27.0
with:
sarif_file: phpmd-results.sarif
wait-for-processing: true

0 comments on commit a0627a3

Please sign in to comment.