Documentation
¶
Index ¶
- type DetectionUtils
- func (du *DetectionUtils) CollectFileExtensions(files []string) map[string]int
- func (du *DetectionUtils) DetectFileLanguage(filename string) string
- func (du *DetectionUtils) DetectTechnologies(files []string) []string
- func (du *DetectionUtils) IdentifyKeyFiles(files []string) []string
- func (du *DetectionUtils) IdentifyPotentialIssues(files []string) []string
- type ProjectAnalyzer
- type StatsResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DetectionUtils ¶ added in v1.0.4
type DetectionUtils struct{}
DetectionUtils provides utility functions for detecting technologies, key files, and issues
func NewDetectionUtils ¶ added in v1.0.4
func NewDetectionUtils() *DetectionUtils
NewDetectionUtils creates a new DetectionUtils instance
func (*DetectionUtils) CollectFileExtensions ¶ added in v1.0.4
func (du *DetectionUtils) CollectFileExtensions(files []string) map[string]int
CollectFileExtensions collects file extensions and their counts
func (*DetectionUtils) DetectFileLanguage ¶ added in v1.0.4
func (du *DetectionUtils) DetectFileLanguage(filename string) string
DetectFileLanguage detects the programming language of a file
func (*DetectionUtils) DetectTechnologies ¶ added in v1.0.4
func (du *DetectionUtils) DetectTechnologies(files []string) []string
DetectTechnologies identifies technologies used in the project
func (*DetectionUtils) IdentifyKeyFiles ¶ added in v1.0.4
func (du *DetectionUtils) IdentifyKeyFiles(files []string) []string
IdentifyKeyFiles identifies important files in the project
func (*DetectionUtils) IdentifyPotentialIssues ¶ added in v1.0.4
func (du *DetectionUtils) IdentifyPotentialIssues(files []string) []string
IdentifyPotentialIssues identifies potential issues in the project
type ProjectAnalyzer ¶
type ProjectAnalyzer struct {
Dir string
IncludePatterns []string
ExcludePatterns []string
MinSize int64
MaxSize int64
MaxFiles int
MaxTotalSize int64
WorkerCount int
Files []string
TotalSize int64
TokenCount int
CharCount int
BinaryCache *binary.Cache
}
ProjectAnalyzer analyzes a project directory
func New ¶
func New( dir string, includePatterns, excludePatterns []string, minSize, maxSize int64, maxFiles int, maxTotalSize int64, workerCount int, ) *ProjectAnalyzer
New creates a new project analyzer
func (*ProjectAnalyzer) CollectFiles ¶
func (pa *ProjectAnalyzer) CollectFiles() error
CollectFiles gathers files to be processed
func (*ProjectAnalyzer) GenerateProjectStructure ¶
func (pa *ProjectAnalyzer) GenerateProjectStructure() (string, error)
GenerateProjectStructure creates a string representation of the project structure
func (*ProjectAnalyzer) ProcessFiles ¶
func (pa *ProjectAnalyzer) ProcessFiles(outputDir string, format string) (StatsResult, error)
ProcessFiles processes the files and generates output in the specified format
type StatsResult ¶
type StatsResult struct {
FileCount int
TotalSize int64
TokenCount int
CharCount int
ProcessTime time.Duration
FilesPerSec float64
OutputPath string
Technologies []string
KeyFiles []string
Issues []string
FileTypes map[string]int
}
StatsResult represents statistics from project analysis