scanner

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectLanguage

func DetectLanguage(repoPath string) string

DetectLanguage detects the primary language of a repository

Types

type ScanMetrics

type ScanMetrics struct {
	DirsScanned    int
	DirsExcluded   int
	DirsSkipped    int // max depth
	ReposFound     int
	RootsTotal     int
	RootsCompleted int
	TotalDirs      int
	DeepestPath    string
	DeepestDepth   int
	LargestDir     string
	LargestDirSize int // subdirs count
	StartTime      time.Time
	EndTime        time.Time
	// contains filtered or unexported fields
}

ScanMetrics tracks scanning statistics

type Scanner

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

Scanner handles repository scanning

func New

func New(cfg *config.Config, idx *index.Index) *Scanner

New creates a new scanner

func (*Scanner) GetMetrics

func (s *Scanner) GetMetrics() *ScanMetrics

GetMetrics returns scanning metrics

func (*Scanner) Scan

func (s *Scanner) Scan() error

Scan scans all configured roots for git repositories

func (*Scanner) SnapshotMetrics added in v0.4.0

func (s *Scanner) SnapshotMetrics() ScanMetrics

SnapshotMetrics returns a consistent copy of the current scan metrics.

func (*Scanner) WithDryRun

func (s *Scanner) WithDryRun(enabled bool) *Scanner

WithDryRun enables dry-run mode (collect metrics without processing)

func (*Scanner) WithRemoteCheck

func (s *Scanner) WithRemoteCheck(enabled bool) *Scanner

WithRemoteCheck enables remote status checking

Jump to

Keyboard shortcuts

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