code_analyzer

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCodeAnalyzer

func NewCodeAnalyzer(cwd string) contracts.ICodeAnalyzer

NewCodeAnalyzer initializes a new CodeAnalyzer.

Types

type CodeAnalyzer

type CodeAnalyzer struct {
	Cwd string
}

CodeAnalyzer handles the analysis of project files.

func (*CodeAnalyzer) ApplyChanges

func (analyzer *CodeAnalyzer) ApplyChanges(relativePath string) error

ApplyChanges Apply changes by replacing original files with the temp files

func (*CodeAnalyzer) ExtractCodeChanges added in v1.1.0

func (analyzer *CodeAnalyzer) ExtractCodeChanges(text string) ([]models.CodeChange, error)

ExtractCodeChanges extracts code changes from the given text.

func (*CodeAnalyzer) GetProjectFiles

func (analyzer *CodeAnalyzer) GetProjectFiles(rootDir string) ([]models.FileData, error)

func (*CodeAnalyzer) ProcessFile

func (analyzer *CodeAnalyzer) ProcessFile(filePath string, sourceCode []byte) []string

ProcessFile processes a single file using Tree-sitter for syntax analysis (for .cs files).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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