codex

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: 28 Imported by: 0

Documentation

Index

Constants

View Source
const SourceFileEdge psi.TypedEdgeKind[psi.SourceFile] = "SourceFile"

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalysisBuildStep

type AnalysisBuildStep struct{}

func (*AnalysisBuildStep) Process

func (a *AnalysisBuildStep) Process(ctx context.Context, p *Project) (result BuildStepResult, err error)

type AnalysisContext

type AnalysisContext struct {
	// contains filtered or unexported fields
}

type BuildStep

type BuildStep interface {
	// Process executes the build step logic on the given project.
	// It returns the result of the build step and any error that occurred during the process.
	Process(ctx context.Context, p *Project) (result BuildStepResult, err error)
}

BuildStep is an interface that defines the contract for a build step. It represents a step in the build process and provides a method for processing a project.

type BuildStepResult

type BuildStepResult struct {
	Changes int
}

BuildStepResult represents the result of a build step. It contains the number of changes made during the build step.

type Project

type Project struct {
	psi.NodeBase
	// contains filtered or unexported fields
}

Project represents a codex project. It contains all the information about the project.

func NewProject

func NewProject(ctx context.Context, rootPath string) (*Project, error)

NewProject creates a new codex project with the given root path. It initializes the project file system, repository, and other required data structures. It returns a pointer to the created Project object and an error if any.

func (*Project) Close

func (p *Project) Close() error

func (*Project) Commit

func (p *Project) Commit() error

Commit commits the changes made in the project to the file system. It checks if there are any changes to commit, prepares the commit message, and then performs the commit. If there are no changes, it returns nil. It returns an error if any occurs during the commit process.

func (*Project) FS

func (p *Project) FS() repofs.FS

FS returns the file system interface of the project. It provides methods for managing the project's files and directories.

func (*Project) FileSet

func (p *Project) FileSet() *token.FileSet

func (*Project) GetSourceFile

func (p *Project) GetSourceFile(filename string) (_ psi.SourceFile, err error)

GetSourceFile retrieves the source file with the given filename from the project. It returns a pointer to the psi.SourceFile and any error that occurred during the process.

func (*Project) Graph

func (p *Project) Graph() psi.Graph

func (*Project) LanguageProvider

func (p *Project) LanguageProvider() *project.Registry

func (*Project) LogManager

func (p *Project) LogManager() *thoughtstream.Manager

func (*Project) Reindex

func (p *Project) Reindex() error

Reindex is a method that performs the reindexing operation for the project. It updates the index of the project to reflect any changes made to its files. The function returns an error if any error occurs during the reindexing process.

func (*Project) Repo

func (p *Project) Repo() *fti.Repository

func (*Project) Review

func (p *Project) Review() error

func (*Project) RootNode

func (p *Project) RootNode() psi.Node

func (*Project) RootPath

func (p *Project) RootPath() string

RootPath returns the root path of the project.

func (*Project) Sync

func (p *Project) Sync() error

Sync synchronizes the project with the file system. It scans all files in the project directory and imports valid files into the project. Valid files are those that have valid file extensions specified in the `validExtensions` slice. The function returns an error if any occurs during the sync process.

func (*Project) TaskManager

func (p *Project) TaskManager() *tasks.Manager

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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