compile

package
v0.0.0-...-7b96089 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildError

type BuildError struct {
	Pkg      string
	Filename string
	Line     int
	Column   int
	Error    error
}

func (BuildError) String

func (be BuildError) String() string

Implement the String() method for BuildError

type FixBuildStep

type FixBuildStep struct{}

FixBuildStep is responsible for fixing all build errors that were found

func (*FixBuildStep) Process

func (s *FixBuildStep) Process(ctx context.Context, p *codex.Project) (result codex.BuildStepResult, err error)

func (*FixBuildStep) ProcessFix

func (s *FixBuildStep) ProcessFix(ctx context.Context, p *codex.Project, sf psi.SourceFile, buildError *BuildError) error

ProcessFix applies a fix to a build error. It takes in a psi.SourceFile pointer and a BuildError pointer and returns an error. The function sets the 'prepareObjective' field of the NodeProcessor passed into the p.ProcessNodes function to a function that returns a string that includes the build error message. The 'prepareObjective' function is responsible for generating a string that describes what needs to be done to fix a build error. The expected input parameters are the psi.SourceFile 'sf' and pointer to the BuildError 'buildError' that needs to be fixed. The expected output parameter is an error, which is nil if the process finishes successfully.

Jump to

Keyboard shortcuts

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