Skip to content
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

Fix missing fields for CodeClimate formatter #538

Merged
merged 1 commit into from
Oct 2, 2021

Conversation

Lootjs
Copy link
Contributor

@Lootjs Lootjs commented Oct 1, 2021

Q A
Bug fix? yes
New feature? no
Fixed tickets #526

Actually, I was wrong (see #526 ), there is only "severity" field was missing
image
https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html#configuring-jobs-using-variables

Works fine on GitLab Community Edition 13.12.0

@Jibbarth
Copy link
Collaborator

Jibbarth commented Oct 2, 2021

Thanks @Lootjs 👍

Regarding #533, I'm wondering what is really required for codeclimate. Should we add the field issue and change category to categories ?

@Jibbarth Jibbarth linked an issue Oct 2, 2021 that may be closed by this pull request
Copy link
Collaborator

@Jibbarth Jibbarth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's seems ok for me 👍 Thanks @Lootjs

@Jibbarth
Copy link
Collaborator

Jibbarth commented Oct 2, 2021

CI Failure not related

@Jibbarth Jibbarth changed the title Update CodeClimate.php Fix missing fields for CodeClimate formatter Oct 2, 2021
@Jibbarth Jibbarth merged commit e2efae0 into nunomaduro:master Oct 2, 2021
@Lootjs
Copy link
Contributor Author

Lootjs commented Oct 2, 2021

Thanks @Lootjs 👍

Regarding #533, I'm wondering what is really required for codeclimate. Should we add the field issue and change category to categories ?

hi, there is no need to add these fields

@Lootjs Lootjs deleted the fix/codeclimate-report branch October 2, 2021 13:40
@guywarner
Copy link
Contributor

guywarner commented Oct 2, 2021

I think some of the confusion is GitLab claims their using CodeClimate but aren't using the full spec.

I wonder if it would help to change the current --format=codeclimate to --format=gitlab and then add the full specs for CodeClimate? As the docs say for GitLab they use a subset of the codeclimate. In the actual Code Climate docs

https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#data-types

they have a very different list of requirements:

type -- Required. Must always be "issue".
check_name -- Required. A unique name representing the static analysis check that emitted this issue.
description -- Required. A string explaining the issue that was detected.
content -- Optional. A markdown snippet describing the issue, including deeper explanations and links to other resources.
categories -- Required. At least one category indicating the nature of the issue being reported.
location -- Required. A Location object representing the place in the source code where the issue was discovered.
trace -- Optional. A Trace object representing other interesting source code locations related to this issue.
remediation_points -- Optional. An integer indicating a rough estimate of how long it would take to resolve the reported issue.
severity -- Optional. A Severity string (info, minor, major, critical, or blocker) describing the potential impact of the issue found.
fingerprint -- Optional. A unique, deterministic identifier for the specific issue being reported to allow a user to exclude it from future analyses.
`

@guywarner
Copy link
Contributor

Also confirmed working on: GitLab Enterprise Edition 14.4.0-pre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CodeClimate report has correct format?
3 participants