gitlab

package
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package gitlab generates GitLab Code Quality reports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeQuality

type CodeQuality struct {
	Description string   `json:"description,omitempty"`
	Name        string   `json:"check_name,omitempty"`
	Fingerprint string   `json:"fingerprint,omitempty"`
	Severity    Severity `json:"severity,omitempty"`
	Location    Location `json:"location,omitempty"`
}

CodeQuality represents a single code quality finding.

Documentation: https://docs.gitlab.com/ee/ci/testing/code_quality.html#code-quality-report-format

func NewCodeQuality

func NewCodeQuality(diff yamlfmt.FileDiff) (CodeQuality, bool)

NewCodeQuality creates a new CodeQuality object from a yamlfmt.FileDiff.

If the file did not change, i.e. the diff is empty, an empty struct and false is returned.

type Lines added in v0.21.0

type Lines struct {
	Begin int  `json:"begin"`
	End   *int `json:"end,omitempty"`
}

Lines follows the GitLab Code Quality schema.

type Location

type Location struct {
	Path  string `json:"path,omitempty"`
	Lines *Lines `json:"lines,omitempty"`
}

Location is the location of a Code Quality finding.

type Severity

type Severity string

Severity is the severity of a code quality finding.

const (
	Info     Severity = "info"
	Minor    Severity = "minor"
	Major    Severity = "major"
	Critical Severity = "critical"
	Blocker  Severity = "blocker"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL