-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
118 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,94 @@ | ||
--- | ||
kind: pipeline | ||
name: Codequality | ||
|
||
platform: | ||
os: linux | ||
arch: amd64 | ||
|
||
steps: | ||
- name: composer | ||
image: joomlaprojects/docker-images:php7.4 | ||
commands: | ||
- php -v | ||
- composer update | ||
- composer require phpmd/phpmd phpstan/phpstan | ||
volumes: | ||
- name: composer-cache | ||
path: /tmp/composer-cache | ||
|
||
- name: phpcs | ||
image: joomlaprojects/docker-images:php7.4 | ||
commands: | ||
- vendor/bin/phpcs --config-set installed_paths vendor/joomla/coding-standards | ||
- vendor/bin/phpcs -p --report=full --extensions=php --standard=Joomla src/ | ||
|
||
- name: phpmd | ||
image: joomlaprojects/docker-images:php7.4 | ||
commands: | ||
- vendor/bin/phpmd src text cleancode | ||
- vendor/bin/phpmd src text codesize | ||
- vendor/bin/phpmd src text controversial | ||
- vendor/bin/phpmd src text design | ||
- vendor/bin/phpmd src text unusedcode | ||
failure: ignore | ||
|
||
- name: phpstan | ||
image: joomlaprojects/docker-images:php7.4 | ||
commands: | ||
- vendor/bin/phpstan analyse src | ||
failure: ignore | ||
|
||
- name: phploc | ||
image: joomlaprojects/docker-images:php7.4 | ||
commands: | ||
- phploc src | ||
failure: ignore | ||
|
||
- name: phpcpd | ||
image: joomlaprojects/docker-images:php7.4 | ||
commands: | ||
- phpcpd src | ||
failure: ignore | ||
|
||
volumes: | ||
- name: composer-cache | ||
host: | ||
path: /tmp/composer-cache | ||
|
||
{ | ||
"kind": "pipeline", | ||
"name": "Codequality", | ||
"steps": [ | ||
{ | ||
"commands": [ | ||
"php -v", | ||
"composer update", | ||
"composer require phpmd/phpmd phpstan/phpstan" | ||
], | ||
"image": "joomlaprojects/docker-images:php7.4", | ||
"name": "composer", | ||
"volumes": [ | ||
{ | ||
"name": "composer-cache", | ||
"path": "/tmp/composer-cache" | ||
} | ||
] | ||
}, | ||
{ | ||
"commands": [ | ||
"vendor/bin/phpcs --config-set installed_paths vendor/joomla/coding-standards", | ||
"vendor/bin/phpcs --standard=ruleset.xml src/" | ||
], | ||
"depends": [ | ||
"composer" | ||
], | ||
"image": "joomlaprojects/docker-images:php7.4", | ||
"name": "phpcs" | ||
}, | ||
{ | ||
"commands": [ | ||
"vendor/bin/phpmd src text cleancode", | ||
"vendor/bin/phpmd src text codesize", | ||
"vendor/bin/phpmd src text controversial", | ||
"vendor/bin/phpmd src text design", | ||
"vendor/bin/phpmd src text unusedcode" | ||
], | ||
"depends": [ | ||
"composer" | ||
], | ||
"failure": "ignore", | ||
"image": "joomlaprojects/docker-images:php7.4", | ||
"name": "phpmd" | ||
}, | ||
{ | ||
"commands": [ | ||
"vendor/bin/phpstan analyse src" | ||
], | ||
"depends": [ | ||
"composer" | ||
], | ||
"failure": "ignore", | ||
"image": "joomlaprojects/docker-images:php7.4", | ||
"name": "phpstan" | ||
}, | ||
{ | ||
"commands": [ | ||
"phploc src" | ||
], | ||
"depends": [ | ||
"composer" | ||
], | ||
"failure": "ignore", | ||
"image": "joomlaprojects/docker-images:php7.4", | ||
"name": "phploc" | ||
}, | ||
{ | ||
"commands": [ | ||
"phpcpd src" | ||
], | ||
"depends": [ | ||
"composer" | ||
], | ||
"failure": "ignore", | ||
"image": "joomlaprojects/docker-images:php7.4", | ||
"name": "phpcpd" | ||
} | ||
], | ||
"volumes": [ | ||
{ | ||
"host": { | ||
"path": "/tmp/composer-cache" | ||
}, | ||
"name": "composer-cache" | ||
} | ||
] | ||
} | ||
--- | ||
kind: signature | ||
hmac: 6cfd57c6b17dcd18db698e3ffbde6a41dc0ebb254efba16864c1fa9e80524e94 | ||
hmac: 6ead9ff74e03f8c82d6613cad3a6e8b2f07e2cfc46017937172f7f0266390a22 | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="Joomla"> | ||
|
||
<arg name="report" value="full"/> | ||
<arg name="tab-width" value="4"/> | ||
<arg name="encoding" value="utf-8"/> | ||
<arg value="sp"/> | ||
<arg name="colors" /> | ||
|
||
<!-- Exclude folders not containing production code --> | ||
<exclude-pattern>*/.github/*</exclude-pattern> | ||
|
||
<!-- Exclude 3rd party libraries. --> | ||
<exclude-pattern>*/vendor/*</exclude-pattern> | ||
|
||
<rule ref="Joomla"> | ||
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/> | ||
</rule> | ||
|
||
<rule ref="Joomla.Classes.InstantiateNewClasses"> | ||
<properties> | ||
<property name="shortArraySyntax" value="true"/> | ||
</properties> | ||
</rule> | ||
</ruleset> |