lint

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLintNotExists = errors.New("linter not exists")

ErrLintNotExists .

Functions

func Lint

func Lint(filetype string, r io.Reader) error

Lint config file,

func RegisterLinter

func RegisterLinter(filetype string, linter Linter)

RegisterLinter register linter for a kind of file

Types

type Error

type Error []LineErr

Error lint error

func (Error) Error

func (errs Error) Error() string

func (Error) String

func (errs Error) String() string

type LineErr

type LineErr struct {
	Line    int    `json:"line"`
	Message string `json:"message"`
}

LineErr error contains line number

type Linter

type Linter interface {
	Lint(r io.Reader) Error
}

Linter lint config file

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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