apilinter

package
v0.0.0-...-700eccd Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Linter

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

func NewLinter

func NewLinter(opts LinterOptions) (*Linter, error)

func (*Linter) LintFiles

func (fl *Linter) LintFiles(files []*protogen.File) ([]lint.Response, error)

type LinterOptions

type LinterOptions struct {
	EnabledRules  []string
	DisabledRules []string
	ConfigPath    string
}

type Plugin

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

func NewPlugin

func NewPlugin(opts PluginOptions) (*Plugin, error)

func (*Plugin) Run

func (p *Plugin) Run(gen *protogen.Plugin) (bool, error)

Run lints protos and generates reports returns a boolean to indicate if problems were found only returns an error if it did indeed error return true, nil = all protos linted ok and no errors return false, nil = one or more problems found in one or more protos return false, err = we encountered an error preventing linting

type PluginOptions

type PluginOptions struct {
	Linter            LinterOptions
	ReportFilename    string
	ReportPrettyPrint bool
	ExitOnError       bool
}

Jump to

Keyboard shortcuts

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