autofix

package
v0.0.0-...-88ab25c Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoFixer

type AutoFixer func(result *checker.CheckResult, opts *Options) (*checker.CheckResult, error)

func NewAutoFixer

func NewAutoFixer(dryRun bool, getwd ostestable.Getwd, detectMetaType MetaTypeDetector, createMeta MetaCreator, removeMeta MetaRemover, logger logging.Logger) AutoFixer

func SpyAutoFixer

func SpyAutoFixer(inherited AutoFixer, callArgs *[]AutoFixerCallArgs) AutoFixer

func StubAutoFixer

func StubAutoFixer(skipped *checker.CheckResult, err error) AutoFixer

type AutoFixerCallArgs

type AutoFixerCallArgs struct {
	Result  *checker.CheckResult
	Options *Options
}

type MetaCreator

type MetaCreator func(metaType MetaType, originalPath typedpath.RawPath) error

func NewMetaCreator

func NewMetaCreator(dryRun bool, guidGen meta.GUIDGen, logger logging.Logger) MetaCreator

func StubMetaCreator

func StubMetaCreator(err error) MetaCreator

type MetaRemover

type MetaRemover func(danglingMeta typedpath.RawPath) error

func NewMetaRemover

func NewMetaRemover(dryRun bool) MetaRemover

func StubMetaRemover

func StubMetaRemover(err error) MetaRemover

type MetaType

type MetaType string
const (
	MetaTypeDefaultImporterFolder MetaType = "MetaTypeDefaultImporterFolder"
	MetaTypeTextScriptImporter    MetaType = "MetaTypeTextScriptImporter"
	MetaTypeMonoImporter          MetaType = "MetaTypeMonoImporter"
	MetaTypeDefaultImporter       MetaType = "MetaTypeDefaultImporter"
)

type MetaTypeDetector

type MetaTypeDetector func(missingMeta typedpath.RawPath) (MetaType, error)

func NewMetaTypeDetector

func NewMetaTypeDetector(isDir ostestable.IsDir) MetaTypeDetector

func StubMetaTypeDetector

func StubMetaTypeDetector(result MetaType, err error) MetaTypeDetector

type Options

type Options struct {
	RootDirAbs   typedpath.RawPath
	RootDirRel   typedpath.RawPath
	AllowedGlobs []globs.Glob
}

type OptionsBuilder

type OptionsBuilder func(rootDirAbs typedpath.RawPath, allowedGlobs []globs.Glob) (*Options, error)

func NewOptionsBuilder

func NewOptionsBuilder(getwd ostestable.Getwd) OptionsBuilder

func StubOptionsBuilderWithRootDirAbsAndRel

func StubOptionsBuilderWithRootDirAbsAndRel(rootDirRel typedpath.RawPath) OptionsBuilder

Jump to

Keyboard shortcuts

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