report

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package report writes findings in the formats forges read: SARIF 2.1.0, for GitHub code scanning (and GitLab Ultimate), and GitLab's Code Quality report, which every GitLab tier shows on a merge request. Both place a finding on a file and a line, so a finding whose `where` names no file of the repository (a commit's subject, a gate, a folder) is left out: it stays in the verdict and in --json.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodeQuality

func CodeQuality(repo string, items []Item) ([]byte, error)

CodeQuality writes the findings as a GitLab Code Quality report.

func SARIF

func SARIF(repo string, items []Item) ([]byte, error)

SARIF writes the findings as one SARIF 2.1.0 run of the tool "workline", each rule named <role>/<rule>.

func Write

func Write(repo string, items []Item, sarifFile, codeQualityFile string) error

Write writes the reports asked for; an empty file name skips that one.

Types

type Item

type Item struct {
	Role, Status string
	verdict.Finding
}

Item is a finding with the role that made it and how its run ended.

func FromLine

func FromLine(r *line.Result) []Item

FromLine lists the findings of every step of a line.

func FromRole

func FromRole(role string, r *engine.Result) []Item

FromRole lists the findings of one role's run.

Jump to

Keyboard shortcuts

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