printers

package
v1.58.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: GPL-3.0 Imports: 19 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkstyle added in v1.7.1

type Checkstyle struct {
	// contains filtered or unexported fields
}

func NewCheckstyle added in v1.7.1

func NewCheckstyle(w io.Writer) *Checkstyle

func (Checkstyle) Print added in v1.7.1

func (p Checkstyle) Print(issues []result.Issue) error

type CodeClimate added in v1.14.0

type CodeClimate struct {
	// contains filtered or unexported fields
}

func NewCodeClimate added in v1.14.0

func NewCodeClimate(w io.Writer) *CodeClimate

func (CodeClimate) Print added in v1.14.0

func (p CodeClimate) Print(issues []result.Issue) error

type CodeClimateIssue added in v1.14.0

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

CodeClimateIssue is a subset of the Code Climate spec. https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#data-types It is just enough to support GitLab CI Code Quality. https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html

type GitHub added in v1.57.0

type GitHub struct {
	// contains filtered or unexported fields
}

func NewGitHub added in v1.57.0

func NewGitHub(w io.Writer) *GitHub

NewGitHub output format outputs issues according to GitHub actions the problem matcher regexp.

func (*GitHub) Print added in v1.57.0

func (p *GitHub) Print(issues []result.Issue) error

type GitHubMatcher added in v1.58.0

type GitHubMatcher struct {
	// Owner an ID field that can be used to remove or replace the problem matcher.
	// **required**
	Owner string `json:"owner,omitempty"`
	// Severity indicates the default severity, either 'warning' or 'error' case-insensitive.
	// Defaults to 'error'.
	Severity string          `json:"severity,omitempty"`
	Pattern  []GitHubPattern `json:"pattern,omitempty"`
}

GitHubMatcher defines a problem matcher.

type GitHubPattern added in v1.58.0

type GitHubPattern struct {
	// Regexp the regexp pattern that provides the groups to match against.
	// **required**
	Regexp string `json:"regexp,omitempty"`
	// File a group number containing the file name.
	File int `json:"file,omitempty"`
	// FromPath a group number containing a filepath used to root the file (e.g. a project file).
	FromPath int `json:"fromPath,omitempty"`
	// Line a group number containing the line number.
	Line int `json:"line,omitempty"`
	// Column a group number containing the column information.
	Column int `json:"column,omitempty"`
	// Severity a group number containing either 'warning' or 'error' case-insensitive.
	// Defaults to `error`.
	Severity int `json:"severity,omitempty"`
	// Code a group number containing the error code.
	Code int `json:"code,omitempty"`
	// Message a group number containing the error message.
	// **required** at least one pattern must set the message.
	Message int `json:"message,omitempty"`
	// Loop whether to loop until a match is not found,
	// only valid on the last pattern of a multi-pattern matcher.
	Loop bool `json:"loop,omitempty"`
}

GitHubPattern defines a pattern for a problem matcher.

type GitHubProblemMatchers added in v1.58.0

type GitHubProblemMatchers struct {
	Matchers []GitHubMatcher `json:"problemMatcher,omitempty"`
}

GitHubProblemMatchers defines the root of problem matchers. - https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md - https://github.com/actions/toolkit/blob/main/docs/commands.md#problem-matchers

type HTML added in v1.41.0

type HTML struct {
	// contains filtered or unexported fields
}

func NewHTML added in v1.41.0

func NewHTML(w io.Writer) *HTML

func (HTML) Print added in v1.41.0

func (p HTML) Print(issues []result.Issue) error

type InspectionInstance added in v1.52.0

type InspectionInstance struct {
	// contains filtered or unexported fields
}

InspectionInstance reports a specific defect, warning, error message. Includes location, description, and various optional and custom attributes. https://www.jetbrains.com/help/teamcity/service-messages.html#Inspection+Instance

func (InspectionInstance) Print added in v1.52.0

func (i InspectionInstance) Print(w io.Writer, replacer *strings.Replacer) (int, error)

type InspectionType added in v1.52.0

type InspectionType struct {
	// contains filtered or unexported fields
}

InspectionType is the unique description of the conducted inspection. Each specific warning or an error in code (inspection instance) has an inspection type. https://www.jetbrains.com/help/teamcity/service-messages.html#Inspection+Type

func (InspectionType) Print added in v1.52.0

func (i InspectionType) Print(w io.Writer, escaper *strings.Replacer) (int, error)

type JSON

type JSON struct {
	// contains filtered or unexported fields
}

func NewJSON

func NewJSON(rd *report.Data, w io.Writer) *JSON

func (JSON) Print

func (p JSON) Print(issues []result.Issue) error

type JSONResult added in v1.6.1

type JSONResult struct {
	Issues []result.Issue
	Report *report.Data
}

type JunitXML added in v1.17.0

type JunitXML struct {
	// contains filtered or unexported fields
}

func NewJunitXML added in v1.17.0

func NewJunitXML(w io.Writer) *JunitXML

func (JunitXML) Print added in v1.17.0

func (p JunitXML) Print(issues []result.Issue) error

type Printer

type Printer struct {
	// contains filtered or unexported fields
}

Printer prints issues

func NewPrinter added in v1.57.0

func NewPrinter(log logutils.Log, cfg *config.Output, reportData *report.Data) (*Printer, error)

NewPrinter creates a new Printer.

func (*Printer) Print

func (c *Printer) Print(issues []result.Issue) error

Print prints issues based on the formats defined

type Tab added in v1.4.1

type Tab struct {
	// contains filtered or unexported fields
}

func NewTab added in v1.4.1

func NewTab(printLinterName, useColors bool, log logutils.Log, w io.Writer) *Tab

func (*Tab) Print added in v1.4.1

func (p *Tab) Print(issues []result.Issue) error

func (*Tab) SprintfColored added in v1.4.1

func (p *Tab) SprintfColored(ca color.Attribute, format string, args ...any) string

type TeamCity added in v1.52.0

type TeamCity struct {
	// contains filtered or unexported fields
}

TeamCity printer for TeamCity format.

func NewTeamCity added in v1.52.0

func NewTeamCity(w io.Writer) *TeamCity

NewTeamCity output format outputs issues according to TeamCity service message format.

func (*TeamCity) Print added in v1.52.0

func (p *TeamCity) Print(issues []result.Issue) error

type Text

type Text struct {
	// contains filtered or unexported fields
}

func NewText

func NewText(printIssuedLine, useColors, printLinterName bool, log logutils.Log, w io.Writer) *Text

func (*Text) Print

func (p *Text) Print(issues []result.Issue) error

func (*Text) SprintfColored

func (p *Text) SprintfColored(ca color.Attribute, format string, args ...any) string

Jump to

Keyboard shortcuts

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