fs

package
v0.0.0-...-3200512 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileFromReader

func NewFileFromReader(reader io.Reader, path string, isImport bool) *readerFile

NewFileFromReader creates a new readerFile for provided io.Reader with the given path and isImport flag. readerFile is an implementation of core.File which is used to represent a file in the Code analysis framework

This is required when you want to analyze a standalone file eg. an artifact file

func NewSourceWalker

func NewSourceWalker(config SourceWalkerConfig, langs []core.Language) (*sourceWalker, error)

NewSourceWalker creates a new source walker that can walk the source files in a file system based on language specific rules.

Types

type LocalFileSystemConfig

type LocalFileSystemConfig struct {
	// The directories to find 1st party source files
	AppDirectories []string

	// The directories to find 3rd party source files
	// imported by the application
	ImportDirectories []string

	// Regular expressions to exclude files or directories
	// from traversal
	ExcludePatterns []*regexp.Regexp
}

type SourceWalkerConfig

type SourceWalkerConfig struct {
	IncludeImports bool
}

Jump to

Keyboard shortcuts

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