linter

package
v3.0.116 Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: Apache-2.0 Imports: 16 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// FormatTap for the tap based output format
	FormatTap = "tap"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Linter

type Linter struct {
	Path   string
	Linter func(path string, test *Test) error
}

Linter represents a lint check if a file exists matching the path

type Options

type Options struct {
	options.BaseOptions

	OutFile string
	Format  string
	Tests   []*Test
}

Options contains the command line options

func (*Options) AddFlags

func (o *Options) AddFlags(cmd *cobra.Command)

AddFlags adds command line flags

func (*Options) Lint

func (o *Options) Lint(ls []Linter, dir string) error

Lint lints the given linters and renders the results

func (*Options) LintResource

func (o *Options) LintResource(path string, test *Test, resource interface{}) error

LintResource lints a resource

func (*Options) LintYaml2Resource

func (o *Options) LintYaml2Resource(path string, test *Test, resource interface{}) error

LintYaml2Resource lints a resource

func (*Options) LogResults

func (o *Options) LogResults() error

LogResults logs the results

type Test

type Test struct {
	File    string
	Error   error
	Message string
}

Jump to

Keyboard shortcuts

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