scan

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindGitRepos

func FindGitRepos(
	roots []string,
	dirignore []string,
) (gitReposPaths []string, warnings []string)

FindGitRepos walks each root and returns directories that look like Git worktrees. Simple rules: - A directory containing `.git` (directory) is a repo root. - Or a `.git` file whose contents include "gitdir:" (worktrees/submodules). - When we find a repo root, we SkipDir to avoid descending into nested repos (for now).

Types

type IgnoreMatcher

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

IgnoreMatcher holds compiled patterns and the normalized scan roots.

func NewIgnoreMatcher

func NewIgnoreMatcher(roots []string, raw []string) *IgnoreMatcher

NewIgnoreMatcher normalizes and post-processes patterns for friendlier DX.

func (*IgnoreMatcher) ShouldIgnore

func (m *IgnoreMatcher) ShouldIgnore(absPath string) bool

ShouldIgnore reports whether absPath should be ignored. absPath must be absolute or at least rooted; it is normalized to forward slashes.

Jump to

Keyboard shortcuts

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