printers

package
v0.0.0-...-3a6be0a Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkstyle

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

func NewCheckstyle

func NewCheckstyle(w io.Writer) *Checkstyle

func (Checkstyle) Print

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

type CodeClimate

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

func NewCodeClimate

func NewCodeClimate(w io.Writer) *CodeClimate

func (CodeClimate) Print

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

type CodeClimateIssue

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 HTML

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

func NewHTML

func NewHTML(w io.Writer) *HTML

func (HTML) Print

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

type InspectionInstance

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

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

type InspectionType

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

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

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

type JunitXML

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

func NewJunitXML

func NewJunitXML(w io.Writer) *JunitXML

func (JunitXML) Print

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

type Printer

type Printer interface {
	Print(issues []result.Issue) error
}

func NewGithub

func NewGithub(w io.Writer) Printer

NewGithub output format outputs issues according to GitHub actions format: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message

type Tab

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

func NewTab

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

func (*Tab) Print

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

func (*Tab) SprintfColored

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

type TeamCity

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

TeamCity printer for TeamCity format.

func NewTeamCity

func NewTeamCity(w io.Writer) *TeamCity

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

func (*TeamCity) Print

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