analyzer

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeAnalysis

type ChangeAnalysis struct {
	Added            []string
	Modified         []string
	Deleted          []string
	Renamed          []string
	DiffHints        []string
	FileTypes        map[string]int
	Scopes           []string
	LanguagePatterns map[string]int
	CodeComplexity   string
	ChangeImpact     string
	SemanticHints    []string
	FunctionChanges  []string
	VariableChanges  []string
	ImportChanges    []string
	CommentChanges   []string
	ErrorPatterns    []string
	PerformanceHints []string
	SecurityHints    []string
	TestChanges      []string
	ConfigChanges    []string
}

ChangeAnalysis represents the analysis of staged changes

type FileChange

type FileChange struct {
	Status   string
	FilePath string
}

FileChange represents a single file change

type GitAnalyzer

type GitAnalyzer struct{}

GitAnalyzer handles git repository analysis

func New

func New() *GitAnalyzer

New creates a new GitAnalyzer instance

func (*GitAnalyzer) AmendCommit added in v0.0.5

func (g *GitAnalyzer) AmendCommit(message string) error

AmendCommit amends the last commit with the provided message

func (*GitAnalyzer) AnalyzeChanges

func (g *GitAnalyzer) AnalyzeChanges(changes []FileChange) (*ChangeAnalysis, error)

AnalyzeChanges performs comprehensive analysis of the staged changes

func (*GitAnalyzer) Commit

func (g *GitAnalyzer) Commit(message string) error

Commit creates a git commit with the provided message

func (*GitAnalyzer) GetLastCommitMessage added in v0.0.5

func (g *GitAnalyzer) GetLastCommitMessage() (string, error)

GetLastCommitMessage retrieves the message of the last commit

func (*GitAnalyzer) GetRecentCommits added in v0.0.5

func (g *GitAnalyzer) GetRecentCommits(n int) (string, error)

GetRecentCommits retrieves the last n commit messages

func (*GitAnalyzer) GetStagedChanges

func (g *GitAnalyzer) GetStagedChanges() ([]FileChange, error)

GetStagedChanges retrieves all staged changes from git

func (*GitAnalyzer) GetStagedDiff added in v0.0.5

func (g *GitAnalyzer) GetStagedDiff() (string, error)

GetStagedDiff retrieves the diff of all staged changes

func (*GitAnalyzer) IsGitRepository

func (g *GitAnalyzer) IsGitRepository() bool

IsGitRepository checks if the current directory is a git repository

Jump to

Keyboard shortcuts

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