formatter

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: MIT Imports: 12 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 {
	Metadata lint.FormatterMetadata
}

Checkstyle is an implementation of the Formatter interface which formats the errors to Checkstyle-like format.

func (*Checkstyle) Format

func (f *Checkstyle) Format(failures <-chan lint.Failure, config lint.Config) (string, error)

Format formats the failures gotten from the lint.

func (*Checkstyle) Name

func (f *Checkstyle) Name() string

Name returns the name of the formatter

type Default

type Default struct {
	Metadata lint.FormatterMetadata
}

Default is an implementation of the Formatter interface which formats the errors to text.

func (*Default) Format

func (f *Default) Format(failures <-chan lint.Failure, _ lint.Config) (string, error)

Format formats the failures gotten from the lint.

func (*Default) Name

func (f *Default) Name() string

Name returns the name of the formatter

type Friendly

type Friendly struct {
	Metadata lint.FormatterMetadata
}

Friendly is an implementation of the Formatter interface which formats the errors to JSON.

func (*Friendly) Format

func (f *Friendly) Format(failures <-chan lint.Failure, config lint.Config) (string, error)

Format formats the failures gotten from the lint.

func (*Friendly) Name

func (f *Friendly) Name() string

Name returns the name of the formatter

type Github

type Github struct {
	Metadata lint.FormatterMetadata
}

Github implements a Github annotations compatible formatter.

func (*Github) Format

func (f *Github) Format(failures <-chan lint.Failure, cfg lint.Config) (string, error)

Format formats the failures gotten from the lint.

func (*Github) Name

func (f *Github) Name() string

Name returns the name of the formatter

type JSON

type JSON struct {
	Metadata lint.FormatterMetadata
}

JSON is an implementation of the Formatter interface which formats the errors to JSON.

func (*JSON) Format

func (f *JSON) Format(failures <-chan lint.Failure, config lint.Config) (string, error)

Format formats the failures gotten from the lint.

func (*JSON) Name

func (f *JSON) Name() string

Name returns the name of the formatter

type NDJSON

type NDJSON struct {
	Metadata lint.FormatterMetadata
}

NDJSON is an implementation of the Formatter interface which formats the errors to NDJSON stream.

func (*NDJSON) Format

func (f *NDJSON) Format(failures <-chan lint.Failure, config lint.Config) (string, error)

Format formats the failures gotten from the lint.

func (*NDJSON) Name

func (f *NDJSON) Name() string

Name returns the name of the formatter

type Plain

type Plain struct {
	Metadata lint.FormatterMetadata
}

Plain is an implementation of the Formatter interface which formats the errors to JSON.

func (*Plain) Format

func (f *Plain) Format(failures <-chan lint.Failure, _ lint.Config) (string, error)

Format formats the failures gotten from the lint.

func (*Plain) Name

func (f *Plain) Name() string

Name returns the name of the formatter

type Sarif

type Sarif struct {
	Metadata lint.FormatterMetadata
}

Sarif is an implementation of the Formatter interface which formats revive failures into SARIF format.

func (*Sarif) Format

func (f *Sarif) Format(failures <-chan lint.Failure, cfg lint.Config) (string, error)

Format formats the failures gotten from the lint.

func (*Sarif) Name

func (f *Sarif) Name() string

Name returns the name of the formatter

type Stylish

type Stylish struct {
	Metadata lint.FormatterMetadata
}

Stylish is an implementation of the Formatter interface which formats the errors to JSON.

func (*Stylish) Format

func (f *Stylish) Format(failures <-chan lint.Failure, config lint.Config) (string, error)

Format formats the failures gotten from the lint.

func (*Stylish) Name

func (f *Stylish) Name() string

Name returns the name of the formatter

type Unix

type Unix struct {
	Metadata lint.FormatterMetadata
}

Unix is an implementation of the Formatter interface which formats the errors to a simple line based error format

main.go:24:9: [errorf] should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...)

func (*Unix) Format

func (f *Unix) Format(failures <-chan lint.Failure, _ lint.Config) (string, error)

Format formats the failures gotten from the lint.

func (*Unix) Name

func (f *Unix) Name() string

Name returns the name of the formatter

Jump to

Keyboard shortcuts

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