lint

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdLint

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

CmdLint is a lint command.

func NewCmdLint

func NewCmdLint(
	flags Flags,
	stdout io.Writer,
	stderr io.Writer,
) (*CmdLint, error)

NewCmdLint creates a new CmdLint.

func (*CmdLint) Run

func (c *CmdLint) Run() osutil.ExitCode

Run lints to proto files.

type CmdLintConfig

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

CmdLintConfig is a config for lint command.

func NewCmdLintConfig

func NewCmdLintConfig(
	externalConfig config.ExternalConfig,
	flags Flags,
) CmdLintConfig

NewCmdLintConfig creates a new CmdLintConfig.

func (CmdLintConfig) GenRules

func (c CmdLintConfig) GenRules(
	f file.ProtoFile,
) ([]rule.HasApply, error)

GenRules generates rules which are applied to the filename path.

type Flags

type Flags struct {
	*flag.FlagSet

	ConfigDirPath string
	FixMode       bool
	Reporter      report.Reporter
	Verbose       bool
	Plugins       []shared.RuleSet
}

Flags represents a set of lint flag parameters.

func NewFlags

func NewFlags(
	args []string,
) (Flags, error)

NewFlags creates a new Flags.

Jump to

Keyboard shortcuts

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