report

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Location

type Location struct {
	Column int     `json:"col"`
	Row    int     `json:"row"`
	Offset int     `json:"offset,omitempty"`
	File   string  `json:"file"`
	Text   *string `json:"text,omitempty"`
}

Location provides information on the location of a violation.

func (Location) String

func (l Location) String() string

String shorthand form for a Location.

type RelatedResource

type RelatedResource struct {
	Description string `json:"description"`
	Reference   string `json:"ref"`
}

RelatedResource provides documentation on a violation.

type Report

type Report struct {
	Violations []Violation `json:"violations"`
	Summary    Summary     `json:"summary"`
}

Report aggregate of Violation as returned by a linter run.

func (Report) ViolationsFileCount

func (r Report) ViolationsFileCount() map[string]int

ViolationsFileCount returns the number of files containing violations.

type Summary

type Summary struct {
	FilesScanned  int `json:"files_scanned"`
	FilesFailed   int `json:"files_failed"`
	FilesSkipped  int `json:"files_skipped"`
	NumViolations int `json:"num_violations"`
}

type Violation

type Violation struct {
	Title            string            `json:"title"`
	Description      string            `json:"description"`
	Category         string            `json:"category"`
	Level            string            `json:"level"`
	RelatedResources []RelatedResource `json:"related_resources,omitempty"`
	Location         Location          `json:"location,omitempty"`
}

Violation describes any violation found by Regal.

Jump to

Keyboard shortcuts

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