codequalitytest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package codequalitytest checks GitLab Code Quality reports against what GitLab accepts, for every package that emits one (the CLI's --output gitlab-codequality and the server's /api/v1/gate?format=gitlab-codequality).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Description string `json:"description"`
	CheckName   string `json:"check_name"`
	Fingerprint string `json:"fingerprint"`
	Severity    string `json:"severity"`
	Location    struct {
		Path  string `json:"path"`
		Lines struct {
			Begin int `json:"begin"`
		} `json:"lines"`
	} `json:"location"`
}

Entry is one report entry as GitLab documents it, decoded independently of the writer's model so a field the writer drops is caught.

func AssertGitLabAcceptable

func AssertGitLabAcceptable(t *testing.T, raw []byte) []Entry

AssertGitLabAcceptable fails t unless raw is a report GitLab reads in full: a JSON array whose every entry validates against GitLab's schema (its parser stops at the first entry that does not) and meets the documented requirements the schema leaves out — a check_name, a severity GitLab knows, a repository-relative path without "./", a line — with no fingerprint repeated (GitLab keys entries by it, so a repeat replaces an entry). It returns the decoded entries.

Jump to

Keyboard shortcuts

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