An open API service indexing awesome lists of open source software.

https://github.com/jqassistant-plugin/jqassistant-codeclimate-report-plugin

jQAssistant CodeClimate Report Plugin for GitLab CI
https://github.com/jqassistant-plugin/jqassistant-codeclimate-report-plugin

codeclimate-report gitlab jqassistant

Last synced: 7 days ago
JSON representation

jQAssistant CodeClimate Report Plugin for GitLab CI

Awesome Lists containing this project

README

          

= jQAssistant CodeClimate Report Plugin

This is the CodeClimate Report Plugin of https://jqassistant.org[jQAssistant^].

It allows to generate JSON files in the https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#data-types[CodeClimate format] which can be used to display them e.g. in https://gitlab.com[GitLab] merge requests.

For more information on jQAssistant see https://jqassistant.org[^].

NOTE: Despite linking of source locations is implemented by this plugin the generated links are not valid yet. This requires a https://github.com/jQAssistant/jqassistant/issues/1077[change in jQAssistant] which is scheduled for one of the next releases.

== Setup

The plugin must be declared in the jQAssistant configuration:

[source, yaml]
..jqassistant.yml
----
jqassistant:
plugins:
- group-id: org.jqassistant.plugin
artifact-id: jqassistant-codeclimate-report-plugin
version: 1.0.0
----

During execution of the `analyze` task or goal a file `jqassistant-code-climate-report.json` is created in the report directory. This can be referenced by a GitLab CI configuration:

=== Maven

[source, yaml]
..gitlab-ci.yml
----
stages:
- verify

verify:
stage: verify
script:
- mvn verify # the pom.xml must declare executions for the jQAssistant scan and analyze goals
artifacts:
reports:
codequality:
- target/jqassistant/report/codeclimate/jqassistant-codeclimate-report.json
----

=== CLI

[source, yaml]
..gitlab-ci.yml
----
stages:
- jQAssistant

verify:
stage: jQAssistant
script:
- jqassistant scan -f java:classpath::build/classes # Scan a Java classes directory
- jqassistant analyze # Execute analysis
artifacts:
reports:
codequality:
- jqassistant/report/codeclimate/jqassistant-codeclimate-report.json
----