Documentation ¶
Index ¶
- Constants
- type AnalysisBuildStep
- type AnalysisContext
- type BuildStep
- type BuildStepResult
- type Project
- func (p *Project) Close() error
- func (p *Project) Commit() error
- func (p *Project) FS() repofs.FS
- func (p *Project) FileSet() *token.FileSet
- func (p *Project) GetSourceFile(filename string) (_ psi.SourceFile, err error)
- func (p *Project) Graph() psi.Graph
- func (p *Project) LanguageProvider() *project.Registry
- func (p *Project) LogManager() *thoughtstream.Manager
- func (p *Project) Reindex() error
- func (p *Project) Repo() *fti.Repository
- func (p *Project) Review() error
- func (p *Project) RootNode() psi.Node
- func (p *Project) RootPath() string
- func (p *Project) Sync() error
- func (p *Project) TaskManager() *tasks.Manager
Constants ¶
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 ¶
Project represents a codex project. It contains all the information about the project.
func NewProject ¶
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) Commit ¶
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 ¶
FS returns the file system interface of the project. It provides methods for managing the project's files and directories.
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) LanguageProvider ¶
func (*Project) LogManager ¶
func (p *Project) LogManager() *thoughtstream.Manager
func (*Project) Reindex ¶
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) Sync ¶
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.