checker

package
v1.54.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 30

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AmalgomatedCheckCmd

func AmalgomatedCheckCmd(amalgomatedCmdName string, args []string, stdout io.Writer) (*exec.Cmd, string)

func AmalgomatedRunRawCheck

func AmalgomatedRunRawCheck(amalgomatedCmdName string, args []string, stdout io.Writer)

func AssetRootCmd

func AssetRootCmd(creator Creator, upgradeConfigFn pluginapi.UpgradeConfigFn, short string) *cobra.Command

func NewAmalgomatedChecker

func NewAmalgomatedChecker(typeName okgo.CheckerType, params ...AmalgomatedCheckerParam) okgo.Checker

func RunCommandAndStreamOutput

func RunCommandAndStreamOutput(cmd *exec.Cmd, lineParser func(line string) okgo.Issue, stdout io.Writer)

RunCommandAndStreamOutput runs the provided exec.Cmd. The output that is generated to Stdout and Stderr for the command is processed in a separate goroutine. Each line is provided to the provided lineParser and the JSON representation of the issue returned by the parser is written to the provided stdout. This function will not return until the underlying command has finished executing and all of the generated output has been processed and written to the provided stdout.

Types

type AmalgomatedCheckerParam

type AmalgomatedCheckerParam interface {
	// contains filtered or unexported methods
}

func ParamArgs added in v1.0.0

func ParamArgs(args ...string) AmalgomatedCheckerParam

func ParamIncludeProjectDirFlag added in v1.0.0

func ParamIncludeProjectDirFlag() AmalgomatedCheckerParam

func ParamLineParserWithWd added in v1.0.0

func ParamLineParserWithWd(lineParserWithWd func(line, wd string) okgo.Issue) AmalgomatedCheckerParam

func ParamMultiCPU added in v1.50.0

func ParamMultiCPU(multiCPU okgo.CheckerMultiCPU) AmalgomatedCheckerParam

func ParamPriority added in v1.0.0

func ParamPriority(priority okgo.CheckerPriority) AmalgomatedCheckerParam

type Creator

type Creator interface {
	Type() okgo.CheckerType
	Priority() okgo.CheckerPriority
	MultiCPU() okgo.CheckerMultiCPU
	Creator() CreatorFunction
}

func AssetCheckerCreators

func AssetCheckerCreators(assetPaths ...string) ([]Creator, []okgo.ConfigUpgrader, error)

func NewCreator

func NewCreator(checkerType okgo.CheckerType, priority okgo.CheckerPriority, creatorFn CreatorFunction) Creator

func NewCreatorWithMultiCPU added in v1.50.0

func NewCreatorWithMultiCPU(
	checkerType okgo.CheckerType,
	priority okgo.CheckerPriority,
	multiCPU okgo.CheckerMultiCPU,
	creatorFn CreatorFunction) Creator

type CreatorFunction

type CreatorFunction func(cfgYML []byte) (okgo.Checker, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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