Documentation ¶
Index ¶
Constants ¶
const ( // OutFormatText is a text-based output format, best for CLIs OutFormatText = "text" // OutFormatSimple is a simplified output format, which can be used with something like https://github.com/reviewdog/reviewdog OutFormatSimple = "simple" // OutFormatGitHubActions is an output format supported by GitHub Actions annotations // https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message OutFormatGitHubActions = "github-actions" // OutFormatJSON outputs in json OutFormatJSON = "json" )
Variables ¶
var OutFormats = []string{ OutFormatText, OutFormatSimple, OutFormatGitHubActions, OutFormatJSON, }
OutFormats are all the available output formats. The first one should be the default
var OutFormatsString = strings.Join(OutFormats, ",")
OutFormatsString is all OutFormats, as a comma-separated string
Functions ¶
This section is empty.
Types ¶
type GitHubActions ¶
type GitHubActions struct{}
GitHubActions is a GitHubActions printer meant for use by a GitHub Action annotation
func NewGitHubActions ¶
func NewGitHubActions() *GitHubActions
NewGitHubActions returns a new GitHubActions printer
func (*GitHubActions) Print ¶
func (p *GitHubActions) Print(w io.Writer, fs *result.FileResults) error
Print prints in the format for GitHub actions https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
type JSON ¶ added in v0.2.0
type JSON struct{}
JSON is a JSON printer meant for a machine to read
type Printer ¶
type Printer interface {
Print(io.Writer, *result.FileResults) error
}
Printer is an interface for printing FileResults
func NewPrinter ¶ added in v0.1.1
NewPrinter returns a valid new Printer from a string, or an error if the printer is invalid
type Simple ¶
type Simple struct{}
Simple is a simple printer meant for a machine to read
func (*Simple) Print ¶
Print prints in the format 'filename:line:column: message' based on golint's output: https://github.com/golang/lint/blob/738671d3881b9731cc63024d5d88cf28db875626/golint/golint.go#L121