Documentation ¶
Index ¶
- type Option
- type Plugin
- func (p *Plugin) CommandOutput(ctx context.Context, name string, args ...string) ([]byte, error)
- func (p *Plugin) CustomFormat(format ...string) (parser.Parser, error)
- func (p *Plugin) ExecCommand(ctx context.Context, name string, args ...string) (io.Reader, func(), error)
- func (p *Plugin) Execute(ctx context.Context) error
- func (p *Plugin) Flags() []cli.Flag
- func (p *Plugin) NamedFormat(name string) (parser.Parser, error)
- func (p *Plugin) ToolName() string
- func (p *Plugin) Validate() error
- type RDF
- func (t *RDF) AddLineResult(path string, line int, message string, severity Severity, opts ...Option)
- func (t *RDF) AddPositionResult(path string, line, col int, message string, severity Severity, opts ...Option)
- func (t *RDF) AddRangeResult(path string, start, end int, message string, severity Severity, opts ...Option)
- func (t *RDF) RDJSON() ([]byte, error)
- func (t *RDF) RDJSONL() ([]byte, error)
- type Rule
- type Settings
- type Severity
- type Tool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶ added in v0.17.4
type Option interface {
// contains filtered or unexported methods
}
Option represents an option for the diagnostic result.
type Plugin ¶
type Plugin struct { *plugin.Plugin Settings Settings // contains filtered or unexported fields }
Plugin implements provide the plugin implementation.
func (*Plugin) CommandOutput ¶ added in v0.4.0
CommandOutput executes the given command and returns output.
func (*Plugin) CustomFormat ¶
CustomFormat returns a parser for the given format(s).
func (*Plugin) ExecCommand ¶
func (p *Plugin) ExecCommand(ctx context.Context, name string, args ...string) (io.Reader, func(), error)
ExecCommand executes the given command and returns output stream.
func (*Plugin) NamedFormat ¶
NamedFormat returns a parser for the given format name.
type RDF ¶ added in v0.17.4
type RDF struct {
// contains filtered or unexported fields
}
RDF represents the reviewdog diagnostic results.
func (*RDF) AddLineResult ¶ added in v0.17.4
func (t *RDF) AddLineResult(path string, line int, message string, severity Severity, opts ...Option)
AddLineResult adds a diagnostic result with line number.
func (*RDF) AddPositionResult ¶ added in v0.17.4
func (t *RDF) AddPositionResult(path string, line, col int, message string, severity Severity, opts ...Option)
AddPositionResult adds a diagnostic result with line and column number.
func (*RDF) AddRangeResult ¶ added in v0.17.4
func (t *RDF) AddRangeResult(path string, start, end int, message string, severity Severity, opts ...Option)
AddRangeResult adds a diagnostic result with start and end line number.
type Rule ¶ added in v0.17.4
type Rule struct { // Code for the rule. Code string // URL for the additional rule information. URL string }
Rule represents a rule for the diagnostic result.
type Severity ¶ added in v0.17.4
type Severity int
Severity represents the severity of the diagnostic result.
type Tool ¶
type Tool interface { // Name returns the name of the tool. Name() string // Flags returns the flags for the tool. Flags() []cli.Flag // Parser to be used by reviewdog. Parser() (parser.Parser, error) // Exec executes the tool. Exec(ctx context.Context) (io.Reader, func(), error) }
Tool to be used by the reviewdog.