linter

package
v0.0.0-...-62afbb6 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Rules []Rule `yaml:"rules"`
}

type Linter

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

func NewLinter

func NewLinter(z *zlog.Logger, cfg Config) (*Linter, error)

func (*Linter) Lint

func (l *Linter) Lint(ctx context.Context, ent *index.Entry) ([]int, error)

func (*Linter) LintRule

func (l *Linter) LintRule(ctx context.Context, i int, ent *index.Entry) (bool, error)

func (*Linter) Rule

func (l *Linter) Rule(i int) *Rule

type Rule

type Rule struct {
	Name       string   `yaml:"name"`
	PathGlob   string   `yaml:"path-glob"`
	PathRegexp string   `yaml:"path-re"`
	Shell      []string `yaml:"shell"`
}

Jump to

Keyboard shortcuts

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