issue

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PENDING_ISSUE   = "pending"
	PROCESSED_ISSUE = "processed"
)

Variables

This section is empty.

Functions

func PrintIssueDetails added in v0.8.5

func PrintIssueDetails(issues []Issue, keyStyle, valStyle lipgloss.Style)

Types

type Issue

type Issue struct {
	ID          string
	Title       string
	Description string
	FilePath    string
	FileName    string
	LineNumber  int
}

type IssueManager

type IssueManager interface {
	GetIssues() []Issue
	Scan(src []byte, path string) error
	Walk(root string, ignore []regexp.Regexp) (int, error)
}

func NewIssueManager

func NewIssueManager(issueType string, annotation string) (IssueManager, error)

NewIssueManager will return either a PendingIssue struct or ProcessedIssue struct that satisfies the methods defined in the IssueManager interface. The methods in said interface are used to report new issues an SCM or locate issues that have been reported to an SCM. Each struct will implement methods for walking the project directory and parsing source code files. The main difference is that pending issues will have an annotation with no id, since they haven't been pushed to an scm yet, and processed issues will have their original annotation plus an id so they can be located and removed from the source code file at a later time.

type PendingIssue

type PendingIssue struct {
	Annotation string
	Issues     []Issue
}

func (*PendingIssue) GetIssues

func (pi *PendingIssue) GetIssues() []Issue

func (*PendingIssue) Scan

func (pi *PendingIssue) Scan(src []byte, path string) error

func (*PendingIssue) Walk

func (pi *PendingIssue) Walk(root string, gitIgnore []regexp.Regexp) (int, error)

type ProcessedIssue

type ProcessedIssue struct {
	Annotation string
	Issues     []Issue
}

func (*ProcessedIssue) GetIssues

func (pi *ProcessedIssue) GetIssues() []Issue

func (*ProcessedIssue) Scan

func (pi *ProcessedIssue) Scan(src []byte, path string) error

func (*ProcessedIssue) Walk

func (pi *ProcessedIssue) Walk(root string, ignore []regexp.Regexp) (int, error)

Jump to

Keyboard shortcuts

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