Skip to content

GitLab Code Quality Json Report #1631

@marais-vzc

Description

@marais-vzc

GitLab Provides functionality to report on code quality within their UI on their pipelines as well as merge requests. They provide for a very simplistic conversion of the roslynator reports. I however believe that with a bit of help, this cli could write this report without needing to first convert it to the correct schema.

Would there be any interest in this being added to this project?

If so, my proposal would be to add an additional argument for the analyze command where the report format could be specified (--output-format gitlab). When this is specified, we could then write the report in the required schema.

Although I don't know the codebase too well, it looks like it is a small change that should be made, but I think the report quality for gitlab could be much richer if this tool does the work instead of trying to convert the xml report generated to the correct schema. We could even allow the output of multiple formats with little effort.

Example entry for the GitLab report:

 {
    "type": "issue",
    "fingerprint": "d7692963e1fca2fbe892483184ee30eb",
    "check_name": "CA1822",
    "description": "Mark members as static",
    "severity": "minor",
    "location": {
      "path": "sample.project\\sample.project\\CustomService\\SpecificServiceClient.cs",
      "lines": {
        "begin": "80"
      }
    },
    "categories": [
      "Style"
    ]
  }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions