lint

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LintCode

type LintCode struct {
	Name      string   // lint rule name
	LintLevel string   // file, row, cell
	Level     string   // ERROR, WARN, INFO
	Message   string   // error message
	Column    int      // error column
	Line      int64    // error line
	Func      lintFunc // lint rule function
}

type LintStatus

type LintStatus struct {
	Header     []string   // column names
	RowCount   int64      // row count
	CellCount  int        // row cell num
	ErrorCount int64      // error count
	Lint       []LintCode // lint message

	// file extra info
	Size int64 // file size

	TimeCost int64 // total time cost
}

LintStatus returns information about an record check result

type LintStruct

type LintStruct struct {
	Config common.Config
	Levels []string
	Rules  map[string]LintCode
	Status LintStatus
}

func NewLintStruct

func NewLintStruct(c common.Config) (*LintStruct, error)

func (*LintStruct) Lint

func (l *LintStruct) Lint() error

Lint lint file one time for one file only

func (*LintStruct) ShowStatus

func (l *LintStruct) ShowStatus() error

ShowStatus check lint status

Jump to

Keyboard shortcuts

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