walkers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(config *linter.Config, globalCtx *GlobalContext, pal *palette.Palette)

Types

type BlockChecker

type BlockChecker struct {
	linter.BlockCheckerDefaults
	// contains filtered or unexported fields
}

func NewBlockChecker

func NewBlockChecker(ctx *linter.BlockContext, root *RootChecker) *BlockChecker

func (*BlockChecker) BeforeEnterNode

func (b *BlockChecker) BeforeEnterNode(n ir.Node)

func (*BlockChecker) EnterNode

func (b *BlockChecker) EnterNode(n ir.Node) bool

func (*BlockChecker) LeaveNode

func (b *BlockChecker) LeaveNode(n ir.Node)

type BlockIndexer

type BlockIndexer struct {
	linter.BlockCheckerDefaults
}

type FileMeta

type FileMeta struct {
	Functions *symbols.Functions
}

FileMeta describes the data to be cached.

func NewFileMeta

func NewFileMeta() FileMeta

NewFileMeta returns a new FileMeta instance with pre-allocated fields.

type GlobalContext

type GlobalContext struct {
	Info *meta.Info

	Functions *symbols.Functions
}

func NewGlobalContext

func NewGlobalContext(info *meta.Info) *GlobalContext

func (*GlobalContext) Decode

func (ctx *GlobalContext) Decode(r io.Reader, filename string) error

Decode recovers data from cache.

func (*GlobalContext) Encode

func (ctx *GlobalContext) Encode(writer io.Writer, checker linter.RootChecker) error

Encode caches the data of one rootWalker of one file.

func (*GlobalContext) UpdateMeta

func (ctx *GlobalContext) UpdateMeta(f *FileMeta, filename string)

UpdateMeta recovers data by collecting it from each file.

func (*GlobalContext) Version

func (ctx *GlobalContext) Version() string

Version returns the current version of the cache.

type RootChecker

type RootChecker struct {
	linter.RootCheckerDefaults
	// contains filtered or unexported fields
}

func NewRootChecker

func NewRootChecker(palette *palette.Palette, globalCtx *GlobalContext, ctx *linter.RootContext) *RootChecker

func (*RootChecker) AfterEnterNode

func (r *RootChecker) AfterEnterNode(n ir.Node)

func (*RootChecker) BeforeEnterFile

func (r *RootChecker) BeforeEnterFile()

func (*RootChecker) BeforeEnterNode

func (r *RootChecker) BeforeEnterNode(n ir.Node)

func (*RootChecker) EnterNode

func (r *RootChecker) EnterNode(n ir.Node) bool

func (*RootChecker) LeaveNode

func (r *RootChecker) LeaveNode(ir.Node)

type RootIndexer

type RootIndexer struct {
	linter.RootCheckerDefaults
	// contains filtered or unexported fields
}

func NewRootIndexer

func NewRootIndexer(globalCtx *GlobalContext, ctx *linter.RootContext) *RootIndexer

func (*RootIndexer) AfterLeaveFile

func (r *RootIndexer) AfterLeaveFile()

func (*RootIndexer) BeforeEnterFile

func (r *RootIndexer) BeforeEnterFile()

func (*RootIndexer) BeforeEnterNode

func (r *RootIndexer) BeforeEnterNode(n ir.Node)

Jump to

Keyboard shortcuts

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