Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultMatchPhrases = []string{"TODO", "FIXME", "OPTIMIZE", "HACK", "XXX", "WTF", "LEGACY"}
DefaultMatchPhrases are the phrase markers matched when no custom list is supplied.
Functions ¶
func WriteTodos ¶
WriteTodos renders a report of todos
func WriteTodosWithOptions ¶ added in v0.0.17
func WriteTodosWithOptions(todos ToDos, writer io.Writer, options ReportOptions) error
WriteTodosWithOptions renders a report of todos with explicit report options.
Types ¶
type BlameLookupFailure ¶ added in v0.0.17
BlameLookupFailure is a non-fatal failure to find git blame for one file.
func (BlameLookupFailure) Error ¶ added in v0.0.17
func (f BlameLookupFailure) Error() string
func (BlameLookupFailure) Unwrap ¶ added in v0.0.17
func (f BlameLookupFailure) Unwrap() error
type BlameLookupFailures ¶ added in v0.0.17
type BlameLookupFailures []BlameLookupFailure
BlameLookupFailures collects non-fatal blame lookup failures.
func (BlameLookupFailures) Error ¶ added in v0.0.17
func (f BlameLookupFailures) Error() string
type ColorMode ¶ added in v0.0.17
type ColorMode string
ColorMode controls ANSI color rendering in human-readable reports.
func ParseColorMode ¶ added in v0.0.17
ParseColorMode converts a CLI color mode value to a report color mode.
type ContextLine ¶ added in v0.0.17
ContextLine is one source line rendered around a finding.
type ReportOptions ¶ added in v0.0.17
type ReportOptions struct {
Color ColorMode
}
ReportOptions configures human-readable report rendering.
type ToDo ¶
type ToDo struct {
comments.Comment
String string
Phrase string
Blame *blame.Blame
Context []ContextLine
}
ToDo represents a ToDo item
func NewToDoWithPhrases ¶ added in v0.0.17
NewToDoWithPhrases produces a pointer to a ToDo from a comment and explicit phrase list.
type ToDos ¶
type ToDos []*ToDo
ToDos represents a list of ToDo items
func (ToDos) CountWithCommits ¶
CountWithCommits returns the number of todos with an associated commit (in which that todo was added)
func (ToDos) FindContext ¶ added in v0.0.17
FindContext sets source context lines around each todo.