gopdd

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBlame

func GetBlame(file string, linenum int) []string

func IsInsideWorkTree

func IsInsideWorkTree(file string) bool

func PuzzleId

func PuzzleId(marker Marker, body string) string

func TailOf

func TailOf(rest []string, prefix string, offset int) ([]string, error)

Types

type AvailableRolesRule

type AvailableRolesRule struct {
	// contains filtered or unexported fields
}

func (AvailableRolesRule) ApplyTo

func (r AvailableRolesRule) ApplyTo(puzzles []Puzzle) []string

type Base

type Base struct {
	Dir           string
	Exclude       []string
	Include       []string
	Rules         []Rule
	SkipGitignore bool
	Logger        *logrus.Logger
}

func (Base) ApplyRules

func (b Base) ApplyRules(puzzles []Puzzle) error

func (Base) JsonPuzzles

func (b Base) JsonPuzzles(skipErrors bool) []byte

func (Base) Puzzles

func (b Base) Puzzles(skipErrors bool) []Puzzle

type GitInfo

type GitInfo struct {
	// contains filtered or unexported fields
}

type Marker

type Marker struct {
	// contains filtered or unexported fields
}

func MarkerOf

func MarkerOf(text string) (Marker, error)

type MaxDuplicatesRule

type MaxDuplicatesRule struct {
	// contains filtered or unexported fields
}

func (MaxDuplicatesRule) ApplyTo

func (r MaxDuplicatesRule) ApplyTo(puzzles []Puzzle) []string

type MaxEstimateRule

type MaxEstimateRule struct {
	// contains filtered or unexported fields
}

func (MaxEstimateRule) ApplyTo

func (r MaxEstimateRule) ApplyTo(puzzles []Puzzle) []string

type MinStimateRule

type MinStimateRule struct {
	// contains filtered or unexported fields
}

func (MinStimateRule) ApplyTo

func (r MinStimateRule) ApplyTo(puzzles []Puzzle) []string

type MinWordsRule

type MinWordsRule struct {
	// contains filtered or unexported fields
}

func (MinWordsRule) ApplyTo

func (r MinWordsRule) ApplyTo(puzzles []Puzzle) []string

type Puzzle

type Puzzle struct {
	Id       string `json:"id"`
	Ticket   string `json:"ticket"`
	Estimate int    `json:"estimate"`
	Role     string `json:"role"`
	Lines    string `json:"lines"`
	Body     string `json:"body"`
	File     string `json:"file"`
	Author   string `json:"author"`
	Email    string `json:"email"`
	Time     string `json:"time"`
}

type Rule

type Rule interface {
	ApplyTo([]Puzzle) []string
}

func RulesOf

func RulesOf(rulesstrings []string) []Rule

type Source

type Source struct {
	// contains filtered or unexported fields
}

func (Source) CollectPuzzles

func (s Source) CollectPuzzles(skipErrors bool) ([]Puzzle, error)

func (Source) GetGitInfo

func (s Source) GetGitInfo(pos int) GitInfo

func (Source) PathFromRoot added in v1.2.0

func (s Source) PathFromRoot() string

func (Source) PuzzleOf

func (s Source) PuzzleOf(td TodoLine, following []string, idx int) (Puzzle, error)

type Sources

type Sources struct {
	// contains filtered or unexported fields
}

func MakeSources

func MakeSources(dir string, exclude []string, include []string, useGitignore bool) (Sources, error)

type TodoLine

type TodoLine struct {
	// contains filtered or unexported fields
}

func FindTodo

func FindTodo(line string) (*TodoLine, error)

Jump to

Keyboard shortcuts

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