Versions in this module Expand all Collapse all v0 v0.2.0 Apr 14, 2020 Changes in this version + var DebugParseDuration time.Duration + var TypoFixer *misspell.Replacer v0.1.0 Oct 31, 2019 Changes in this version + const FlagBreak + const FlagContinue + const FlagDie + const FlagReturn + const FlagThrow + const IgnoreLinterMessage + const LevelDoNotReject + const LevelError + const LevelHint + const LevelInformation + const LevelSyntax + const LevelUnused + const LevelWarning + var AnalysisFiles []string + var CacheDir string + var CheckAutoGenerated bool + var Debug bool + var DefaultEncoding string + var ExcludeRegex *regexp.Regexp + var IsDiscardVar = isUnderscore + var LangServer bool + var MaxConcurrency int + var MaxFileSize int + var PHPExtensions []string + var Rules = &rules.Set + var SrcInput = inputs.NewDefaultSourceInput() + var StubsDir string + func AnalyzeFileRootLevel(rootNode node.Node, d *RootWalker) + func DebugMessage(msg string, args ...interface{}) + func DeclareCheck(info CheckInfo) + func FlagsToString(f int) string + func FmtNode(n node.Node) string + func IndexFile(filename string, contents []byte) error + func InitStubs() + func MemoryLimiterThread() + func RegisterBlockChecker(c BlockCheckerCreateFunc) + func RegisterRootChecker(c RootCheckerCreateFunc) + func RegisterRootCheckerWithCacher(cacher MetaCacher, c RootCheckerCreateFunc) + type BlockChecker interface + AfterEnterNode func(walker.Walkable) + AfterLeaveNode func(walker.Walkable) + BeforeEnterNode func(walker.Walkable) + BeforeLeaveNode func(walker.Walkable) + type BlockCheckerCreateFunc func(*BlockContext) BlockChecker + type BlockCheckerDefaults struct + func (BlockCheckerDefaults) AfterEnterNode(walker.Walkable) + func (BlockCheckerDefaults) AfterLeaveNode(walker.Walkable) + func (BlockCheckerDefaults) BeforeEnterNode(walker.Walkable) + func (BlockCheckerDefaults) BeforeLeaveNode(walker.Walkable) + type BlockContext struct + func (ctx *BlockContext) ClassParseState() *meta.ClassParseState + func (ctx *BlockContext) Filename() string + func (ctx *BlockContext) IsRootLevel() bool + func (ctx *BlockContext) IsStatement(n node.Node) bool + func (ctx *BlockContext) PrematureExitFlags() int + func (ctx *BlockContext) Report(n node.Node, level int, checkName, msg string, args ...interface{}) + func (ctx *BlockContext) RootState() map[string]interface{} + func (ctx *BlockContext) Scope() *meta.Scope + type BlockWalker struct + func (b *BlockWalker) EnterNode(w walker.Walkable) (res bool) + func (b *BlockWalker) LeaveNode(w walker.Walkable) + func (b *BlockWalker) ReportBitwiseOp(s node.Node, op string, rightOp string) + type CheckInfo struct + Comment string + Default bool + Name string + func GetDeclaredChecks() []CheckInfo + type FileInfo struct + Contents []byte + Filename string + LineRanges []git.LineRange + type MetaCacher interface + Decode func(r io.Reader, filename string) error + Encode func(io.Writer, RootChecker) error + Version func() string + type ParseWaiter struct + func BeforeParse(size int, filename string) *ParseWaiter + func (p *ParseWaiter) Finish() + type ReadCallback func(ch chan FileInfo) + func ReadChangesFromWorkTree(dir string, changes []git.Change) ReadCallback + func ReadFilenames(filenames []string, ignoreRegex *regexp.Regexp) ReadCallback + func ReadFilesFromGit(repo, commitSHA1 string, ignoreRegex *regexp.Regexp) ReadCallback + func ReadFilesFromGitWithChanges(repo, commitSHA1 string, changes []git.Change) ReadCallback + func ReadOldFilesFromGit(repo, commitSHA1 string, changes []git.Change) ReadCallback + type Report struct + func DiffReports(gitRepo string, diffArgs []string, changesList []git.Change, ...) (res []*Report, err error) + func ParseFilenames(readFileNamesFunc ReadCallback) []*Report + func (r *Report) CheckName() string + func (r *Report) GetFilename() string + func (r *Report) IsCritical() bool + func (r *Report) IsDisabledByUser() bool + func (r *Report) MarshalJSON() ([]byte, error) + func (r *Report) String() string + type RootChecker interface + AfterEnterNode func(walker.Walkable) + AfterLeaveFile func() + AfterLeaveNode func(walker.Walkable) + BeforeEnterNode func(walker.Walkable) + BeforeLeaveNode func(walker.Walkable) + type RootCheckerCreateFunc func(*RootContext) RootChecker + type RootCheckerDefaults struct + func (RootCheckerDefaults) AfterEnterNode(walker.Walkable) + func (RootCheckerDefaults) AfterLeaveFile() + func (RootCheckerDefaults) AfterLeaveNode(walker.Walkable) + func (RootCheckerDefaults) BeforeEnterNode(walker.Walkable) + func (RootCheckerDefaults) BeforeLeaveNode(walker.Walkable) + type RootContext struct + func (ctx *RootContext) ClassParseState() *meta.ClassParseState + func (ctx *RootContext) FileContents() []byte + func (ctx *RootContext) Filename() string + func (ctx *RootContext) Report(n node.Node, level int, checkName, msg string, args ...interface{}) + func (ctx *RootContext) Scope() *meta.Scope + func (ctx *RootContext) State() map[string]interface{} + type RootWalker struct + Diagnostics []vscode.Diagnostic + Lines [][]byte + LinesPositions []int + Scopes map[node.Node]*meta.Scope + func NewWalkerForLangServer(prev *RootWalker) *RootWalker + func NewWalkerForReferencesSearcher(filename string, block BlockCheckerCreateFunc) *RootWalker + func ParseContents(filename string, contents []byte, lineRanges []git.LineRange) (rootNode node.Node, w *RootWalker, err error) + func (d *RootWalker) EnterNode(w walker.Walkable) (res bool) + func (d *RootWalker) GetReports() []*Report + func (d *RootWalker) InitCustom() + func (d *RootWalker) InitFromParser(contents []byte, parser *php7.Parser) + func (d *RootWalker) LeaveNode(n walker.Walkable) + func (d *RootWalker) Report(n node.Node, level int, checkName, msg string, args ...interface{}) + func (d *RootWalker) UpdateMetaInfo()