Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorHandler ¶
ErrorHandler handles found TODO references. It can return SkipAll or SkipDir.
type Options ¶
type Options struct { // TODOFunc handles when TODOs are found. TODOFunc TODOHandler // ErrorFunc handles when errors are found. ErrorFunc ErrorHandler // Config is the config for scanning todos. Config *todos.Config // Charset is the character set to use when reading the files or 'detect' // for charset detection. Charset string // ExcludeGlobs is a list of Glob that matches excluded files. ExcludeGlobs []glob.Glob // ExcludeDirGlobs is a list of Glob that matches excluded dirs. ExcludeDirGlobs []glob.Glob // IncludeHidden indicates whether hidden paths should be processed. Hidden // paths are always processed if there are specified explicitly in `paths`. IncludeHidden bool // IncludeVendored indicates whether vendored paths should be processed. Vendored // paths are always processed if there are specified explicitly in `paths`. IncludeVendored bool // IncludeVCS indicates that VCS paths (.git, .hg, .svn, etc.) should be included. IncludeVCS bool // Paths are the paths to walk to look for TODOs. Paths []string }
Options are options for the walker.
type TODOHandler ¶
TODOHandler handles found TODO references. It can return SkipAll or SkipDir.
type TODOWalker ¶
type TODOWalker struct {
// contains filtered or unexported fields
}
TODOWalker walks the directory tree and scans files for TODOS.
func (*TODOWalker) Walk ¶
func (w *TODOWalker) Walk() bool
Walk walks the paths and scans files it finds for TODOs. It does not fail when it encounters errors. It instead prints an error message and returns true if errors were encountered.
Click to show internal directories.
Click to hide internal directories.