Skip to content

Conversation

@slipknois
Copy link
Contributor

@slipknois slipknois commented Dec 1, 2025

A compliant report need to output lines on "location" object to work properly as doc in link show us: https://docs.gitlab.com/ci/testing/code_quality/

This commit write de "lines" property properly. If "location" object don't output the line, the gitlab show a message saying "Failed to load Code Quality report"

adjust lines properties on gitlab report
@google-cla
Copy link

google-cla bot commented Dec 1, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@slipknois slipknois marked this pull request as draft December 1, 2025 14:24
@slipknois slipknois marked this pull request as ready for review December 1, 2025 14:24
Copy link
Collaborator

@braydonk braydonk left a comment

Choose a reason for hiding this comment

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

The changes to the comments are nonsensical. I get the sense an AI Agent was too aggressive with them. Please restore all changed godoc comments to their original form.

In addition, please update the PR title and description to provide explanation and documentation about this from GitLab. What you've provided is insufficient for me to feel confident in the PR and review.

A compliant report need to output lines on "location" object to work properly as doc in link show us: https://docs.gitlab.com/ci/testing/code_quality/

This commit write de "lines" property properly. If "location" object don't output the line, the gitlab show a message saying "Failed to load Code Quality report"
@slipknois slipknois requested a review from braydonk December 1, 2025 14:44
Copy link
Collaborator

@braydonk braydonk left a comment

Choose a reason for hiding this comment

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

Same request as above.

@slipknois slipknois changed the title Update codequality.go Solving missing line param on gitlab coequality Dec 1, 2025
@slipknois
Copy link
Contributor Author

Same request as above.

I changed the title, restored the comments to their original state... Is there anything else that needs adjusting? I'm trying to resolve this issue because the generated report wasn't compliant with GitLab, and I'm having problems because GitLab can't read the report file!

@slipknois slipknois requested a review from braydonk December 1, 2025 17:27
Copy link
Collaborator

@braydonk braydonk left a comment

Choose a reason for hiding this comment

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

This PR also needs a tests added. I would recommend adding a testdata folder and having a before and after of a formatted yaml file with a reasonable number of lines, and expect a particular Lines.Begin value from the created code quality (i.e. the line this detects as first differing is what the codequality report produces).


// Lines follows the GitLab Code Quality schema.
type Lines struct {
Begin *int `json:"begin,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

My previous comment was for the End field. #294 (comment)

I didn't want it to be removed; I wanted End to change to *int and get omitempty. Begin was supposed to stay the way it was.

@braydonk
Copy link
Collaborator

braydonk commented Dec 2, 2025

This will need to be rebased to handle the API change in #295

@slipknois slipknois marked this pull request as draft December 3, 2025 11:11
@slipknois slipknois closed this Dec 3, 2025
@slipknois
Copy link
Contributor Author

new PR #298

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.

3 participants