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 ¶
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.