scanner

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClassifyEntry

func ClassifyEntry(name string, isDir bool, isGitRepo bool, includedSet map[string]bool, isExcluded func(string) bool) model.LocalEntry

ClassifyEntry classifies a single directory name given the included repos and excluded names. isDir: whether the entry is a directory isGitRepo: whether the directory contains a .git subdirectory (only relevant if isDir) Returns the classification and detail string.

Types

type ScanResult

type ScanResult struct {
	// ManagedFound are repos that exist locally and match an included repo
	ManagedFound []string
	// ManagedMissing are repos that don't exist locally (clone candidates)
	ManagedMissing []string
	// Collisions are repos where the path exists but isn't a valid git clone
	Collisions []model.LocalEntry
	// Unknown are directories that don't match any repo (included or excluded)
	Unknown []model.LocalEntry
	// ExcludedButPresent are directories matching excluded repos
	ExcludedButPresent []model.LocalEntry
}

ScanResult holds the result of scanning the local directory.

func ScanDirectory

func ScanDirectory(dir string, includedRepos []model.RepoInfo, excludedNames []string, cfg *config.Config) (*ScanResult, error)

ScanDirectory scans the given directory and classifies each immediate child entry. includedRepos: repos after visibility+exclusion filtering (the ones we want to manage) excludedNames: repo names that were excluded by config allRepoNames: set of all org repo names (before exclusion) for unknown classification

Jump to

Keyboard shortcuts

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