Include column numbers in GitLab output format.#19708
Merged
MichaReiser merged 1 commit intoastral-sh:mainfrom Aug 3, 2025
Merged
Include column numbers in GitLab output format.#19708MichaReiser merged 1 commit intoastral-sh:mainfrom
MichaReiser merged 1 commit intoastral-sh:mainfrom
Conversation
579d6e2 to
b4c004c
Compare
MichaReiser
reviewed
Aug 3, 2025
Member
MichaReiser
left a comment
There was a problem hiding this comment.
Thank you. I've a few nit comments but that overall looks good
## Summary
The CodeClimate report format, which GitLab adopted in a reduced form,
supports two ways for specifying diagnostic error locations:
```json
{
"path": "path/to/file.css",
"lines": {
"begin": 13,
"end": 14
}
}
```
```json
{
"path": "path/to/file.css",
"positions": {
"begin": {
"line": 3,
"column": 10
},
"end": {
"line": 4,
"column": 12
}
}
}
```
The second form is richer, as it can include column numbers, which Ruff
happens to be able to provide. Ruff will now use the second form.
More details on the specification in https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#locations.
GitLab supports both forms; see https://docs.gitlab.com/ci/testing/code_quality/#code-quality-report-format.
## Test Plan
Change is covered by unit tests; snapshots have been updated.
b4c004c to
0116421
Compare
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The CodeClimate report format, which GitLab adopted in a reduced form, supports two ways for specifying diagnostic error locations:
{ "path": "path/to/file.css", "lines": { "begin": 13, "end": 14 } }{ "path": "path/to/file.css", "positions": { "begin": { "line": 3, "column": 10 }, "end": { "line": 4, "column": 12 } } }The second form is richer, as it can include column numbers, which Ruff happens to be able to provide. Ruff will now use the second form.
More details on the specification in https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#locations.
GitLab supports both forms; see https://docs.gitlab.com/ci/testing/code_quality/#code-quality-report-format.
Test Plan
Change is covered by unit tests; snapshots have been updated.