scanner

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scanner

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

Scanner finds source files in a directory.

func NewScanner

func NewScanner(cfg *config.Config) *Scanner

NewScanner creates a new file scanner.

func (*Scanner) FilterByLanguage

func (s *Scanner) FilterByLanguage(files []string, lang parser.Language) []string

FilterByLanguage filters files to only those of a specific language.

func (*Scanner) GroupByLanguage

func (s *Scanner) GroupByLanguage(files []string) map[parser.Language][]string

GroupByLanguage groups files by their detected language.

func (*Scanner) ScanDir

func (s *Scanner) ScanDir(root string) ([]string, error)

ScanDir recursively scans a directory for source files. Uses filepath.WalkDir for better performance (avoids stat calls).

func (*Scanner) ScanFile

func (s *Scanner) ScanFile(path string) (bool, error)

ScanFile checks if a single file should be analyzed.

Jump to

Keyboard shortcuts

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