Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildError ¶
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.