Skip to content

Commit c45129e

Browse files
committed
Fix the phpcpd exclusions to "Tests" and add it to composer
Also, make the check to really fail the build if there are cases found, coz it's not useful to have it failing all the time without noticing.
1 parent cd3e39f commit c45129e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/phpcs.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
extensions: ${{ matrix.extensions }}
2525
ini-values: pcov.directory=moodle
2626
coverage: pcov
27-
tools: composer, phpcpd
27+
tools: composer
2828

2929
- name: Install composer dependencies
3030
run: |
@@ -36,9 +36,8 @@ jobs:
3636
./vendor/bin/phplint
3737
3838
- name: PHP Copy/Paste Detector
39-
continue-on-error: true # This step will show errors but will not fail
4039
if: ${{ always() }}
41-
run: phpcpd --exclude moodle/tests moodle
40+
run: ./vendor/bin/phpcpd --exclude moodle/Tests moodle
4241

4342
- name: Run phpunit
4443
if: ${{ always() }}

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
"mikey179/vfsstream": "^1.6",
4242
"overtrue/phplint": "^3.0",
4343
"phpmd/phpmd": "^2.11",
44-
"thor-juhasz/phpunit-coverage-check": "^0.3.0"
44+
"thor-juhasz/phpunit-coverage-check": "^0.3.0",
45+
"sebastian/phpcpd": "^6.0"
4546
},
4647
"replace": {
4748
"moodlehq/moodle-local_codechecker": "3.1.0"

0 commit comments

Comments
 (0)