Skip to content

Commit

Permalink
Add PHPMD
Browse files Browse the repository at this point in the history
  • Loading branch information
tai-sho committed Jun 9, 2024
1 parent ba444d9 commit 58b6454
Show file tree
Hide file tree
Showing 4 changed files with 355 additions and 2 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/code_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,24 @@ jobs:
- name: Run PHPUnit
run: vendor/bin/phpunit

phpmd:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run PHPMD
run: vendor/bin/phpmd src github phpmd.xml

php-cs-fixer:
runs-on: ubuntu-latest

Expand All @@ -66,3 +84,4 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Fix styling

3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"require-dev": {
"phpunit/phpunit": "^9.6",
"friendsofphp/php-cs-fixer": "^3.58",
"phpstan/phpstan": "^1.11"
"phpstan/phpstan": "^1.11",
"phpmd/phpmd": "^2.15"
},
"autoload": {
"psr-4": {
Expand Down
316 changes: 315 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 58b6454

Please sign in to comment.