task

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Make added in v0.2.0

func Make(
	ctx context.Context,
	operation Operation,
	tools *spec.ToolSet,
	files []*file.File,
	out chan<- *Task,
) (err error)

Types

type Operation added in v0.2.0

type Operation bool
const (
	OperationCheck Operation = false
	OperationFix   Operation = true
)

type Result

type Result struct {
	Task
	exec.Result
	Failure string
	// contains filtered or unexported fields
}

func (*Result) Errors added in v0.1.0

func (r *Result) Errors(
	ctx context.Context,
) (errors []location.Error, err error)

func (*Result) Less

func (r *Result) Less(other *Result) bool

func (*Result) Path

func (r *Result) Path() (path string)

func (*Result) String

func (r *Result) String() string

type Task

type Task struct {
	File *file.File
	Tool *spec.Tool
	// contains filtered or unexported fields
}

func New

func New(
	tool *spec.Tool,
	command *spec.Command,
	f *file.File,
) *Task

func (*Task) FullCommand

func (t *Task) FullCommand() []string

func (Task) Run

func (t Task) Run(ctx context.Context) (*Result, error)

func (*Task) String added in v0.2.0

func (t *Task) String() string

Jump to

Keyboard shortcuts

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