You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library adds a custom report to [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) (phpcs) to generate a codequality artifact, which can be used by Gitlab CI/CD.
6
+
The custom report will be generated in the Code Climate format and allows Gitlab CI/CD to display the violations in the Code Quality report.
7
+
8
+
## Installation
9
+
10
+
Install this library using [Composer](https://getcomposer.org):
11
+
12
+
```shell script
13
+
composer require --dev micheh/phpcs-gitlab
14
+
```
15
+
16
+
Then adjust your `.gitlab-ci.yml` to run PHP_CodeSniffer with the custom reporter and to gather the codequality artifacts:
The example above uses two reports, one to display in the build log (emacs) and one to generate the codequality artifact file in the Code Climate format.
27
+
28
+
> **Note:** Gitlab currently does not support multiple codequality artifacts.
29
+
> You will not be able to display the violations of multiple tools (e.g. PHP Code Sniffer & PHPStan) in the Code Quality report.
0 commit comments