Skip to content

Gitlab

You can integrate Robocop results with Gitlab Code Quality.

For that purpose you need to generate a report that supports a Code Quality format:

robocop check --reports gitlab
[tool.robocop.lint]
reports = [
    "gitlab"
]

It's also available using --gitlab option:

robocop check --gitlab

By default, it will produce robocop-code-quality.json file in the directory where Robocop was executed. You will need to attach this file to Gitlab artefacts:

stages:
  - lint

robocop:
  stage: lint
  image: python:3.12
  before_script:
    - pip install robotframework-robocop==6.0
  script:
    - robocop check --gitlab
  artifacts:
    reports:
      codequality: robocop-code-quality.json

The Robocop issues will be reported in the open pull requests:

Gitlab Code Quality

See gitlab for more information about the report and how to configure it.