Skip to content

Commit fda2051

Browse files
authored
refactor: phpmd exclude dir
1 parent 9a52b07 commit fda2051

File tree

6 files changed

+8
-4
lines changed

6 files changed

+8
-4
lines changed

.github/workflows/laravel-6.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Lint
3232
run: |
3333
./vendor/bin/phpcs --standard=PSR12 src/ tests/
34-
./vendor/bin/phpmd src/ text src/stubs/phpmd.xml --exclude vendor
34+
./vendor/bin/phpmd . text src/stubs/phpmd.xml
3535
- name: codecov
3636
uses: codecov/codecov-action@v2
3737
with:

.github/workflows/laravel-7.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Lint
3232
run: |
3333
./vendor/bin/phpcs --standard=PSR12 src/ tests/
34-
./vendor/bin/phpmd src/ text src/stubs/phpmd.xml --exclude vendor
34+
./vendor/bin/phpmd . text src/stubs/phpmd.xml
3535
- name: codecov
3636
uses: codecov/codecov-action@v2
3737
with:

.github/workflows/laravel-8.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Lint
3232
run: |
3333
./vendor/bin/phpcs --standard=PSR12 src/ tests/
34-
./vendor/bin/phpmd src/ text src/stubs/phpmd.xml --exclude vendor
34+
./vendor/bin/phpmd . text src/stubs/phpmd.xml
3535
- name: codecov
3636
uses: codecov/codecov-action@v2
3737
with:

src/stubs/git-pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
FILES=$(git diff --diff-filter=d --name-only HEAD | { grep '.php$' || true; })
44
for file in $FILES; do
55
./vendor/bin/phpcs --extensions=php --standard=phpcs.xml "$file"
6-
./vendor/bin/phpmd "$file" text phpmd.xml --exclude vendor
6+
./vendor/bin/phpmd "$file" text phpmd.xml
77
done
88
# XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-text --coverage-filter=app/ tests/

src/stubs/phpmd.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<pmd>
3+
<exclude-pattern>/vendor/</exclude-pattern>
34
<rule ref="rulesets/cleancode.xml">
45
<exclude name="StaticAccess" />
56
</rule>

tests/TestCase.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
class TestCase extends OrchestraTestCase
99
{
10+
/**
11+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
12+
*/
1013
protected function getPackageProviders($app)
1114
{
1215
return [

0 commit comments

Comments
 (0)