analyzer

package
v0.3.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadWorkspace added in v0.3.8

func LoadWorkspace(root string) (*graph.DependencyGraph, error)

LoadWorkspace detects a monorepo/workspace root and scans all members as a unified project. It supports three workspace formats:

  • go.work → Go workspace (contains multiple Go modules via "use" directives)
  • package.json with → npm workspaces (supports glob patterns like "packages/*") "workspaces" field
  • pnpm-workspace.yaml → pnpm workspace (packages: list)

For each workspace member directory, the appropriate language adapter's Load method is called and the resulting graphs are merged.

func ResolveLang added in v0.3.7

func ResolveLang(lang, dir string) string

ResolveLang resolves "auto" to a concrete language key using project detection. It may return "multi".

Types

type Analyzer

type Analyzer interface {
	Name() string
	Load(dir string) (*graph.DependencyGraph, error)
}

Analyzer loads a dependency graph for a project directory.

func ForLang

func ForLang(lang, dir string) (Analyzer, error)

ForLang returns an Analyzer for the given language specifier. lang may be "auto", "go", "node", "php", "python", "java", "rust", or "ruby". "auto" detects from go.mod / package.json / composer.json / requirements.txt / pom.xml / Cargo.toml / Gemfile presence.

type LangFeatures

type LangFeatures struct {
	Upgrade      upgrade.Upgrader
	CapDiff      upgrade.CapDiffer
	PRDiff       prdiff.Differ
	Reachability reachability.Analyzer
}

LangFeatures holds the feature implementations registered for a language.

func FeaturesFor

func FeaturesFor(lang, dir string) (LangFeatures, error)

FeaturesFor returns the feature implementations for the given language. lang may be "auto", "go", "node", "php", "python", "java", "rust", or "ruby".

Jump to

Keyboard shortcuts

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