analyzer

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyzeRootModules

func AnalyzeRootModules(rootModuleDirs []string, changedFiles map[string]struct{}, basePath string, logger *slog.Logger) ([]string, error)

AnalyzeRootModules analyzes multiple root modules and returns the list of updated ones

func ConvertToRelativePath

func ConvertToRelativePath(basePath, absolutePath string) (string, error)

ConvertToRelativePath converts an absolute path to a relative path from basePath

Types

type Analyzer

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

Analyzer analyzes Terraform modules and determines which ones have been updated

func NewAnalyzer

func NewAnalyzer(changedFiles map[string]struct{}, logger *slog.Logger) (*Analyzer, error)

NewAnalyzer creates a new Analyzer instance

func (*Analyzer) ClearCache

func (a *Analyzer) ClearCache()

ClearCache clears the analysis cache

func (*Analyzer) GetAnalysisCache

func (a *Analyzer) GetAnalysisCache() map[string]bool

GetAnalysisCache returns the analysis cache (useful for testing)

func (*Analyzer) IsModuleUpdated

func (a *Analyzer) IsModuleUpdated(moduleDir string) (bool, error)

IsModuleUpdated checks if a module has been updated (directly or indirectly) It uses memoization to cache results and avoid redundant analysis

Jump to

Keyboard shortcuts

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