-
-
Notifications
You must be signed in to change notification settings - Fork 429
Output for the code quality widget in GitLab CI #6697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output for the code quality widget in GitLab CI #6697
Conversation
fd5bfc4 to
48be2ad
Compare
48be2ad to
219df95
Compare
219df95 to
601fe26
Compare
|
Let's give it a try, thank you @VitalyArt |
|
Is there a way to get console output in CI while also generating a report file in the Gitlab format? |
@mickverm you can use the Example: php bin/rector process bin --output-format=gitlab --dry-run | tee output.json |
|
I was thinking something more in line of PHPUnit, where I can get the regular output in the CI console and generate a coverage report at the same time. |
|
@mickverm |
|
This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work. |
Adoption of the CodeClimate format for GitLab CI integration
Specification: https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#data-types
Example
Run command:
Output:
[ { "fingerprint": "7e5f879fe12ff579e958c9935e9ee034", "type": "issue", "categories": [ "Bug Risk" ], "severity": "blocker", "description": "Syntax error, unexpected T_VARIABLE", "check_name": "", "location": { "path": "bin/test-fixture-stats.php", "lines": { "begin": 17 } } }, { "fingerprint": "183de697ac3261bb7f85226e0ef2253a", "type": "issue", "categories": [ "Style" ], "severity": "minor", "description": "MultiDirnameRector / AddVoidReturnTypeWhereNoReturnRector", "content": { "body": "--- Original\n+++ New\n@@ -71,7 +71,7 @@\n $this->loadIfExistsAndNotLoadedYet('vendor/autoload.php');\n }\n \n- public function autoloadFromCommandLine()\n+ public function autoloadFromCommandLine(): void\n {\n $cliArgs = $_SERVER['argv'];\n \n" }, "check_name": "MultiDirnameRector / AddVoidReturnTypeWhereNoReturnRector", "location": { "path": "bin/rector.php", "lines": { "begin": 70 } } } ]Code Quality widget: