checks

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ws *workspace.Workspace, res *extract.Result, cfg *config.Effective, cfgPath string) []findings.Finding

Run executes every enabled, implemented check over the one shared relation (lesson 30) and returns the sorted findings.

Types

type Context

type Context struct {
	View *View
	Cfg  *config.Effective
	// CfgPath is the workspace-root-relative config file path (the site of
	// stale-suppression findings).
	CfgPath string
}

Context carries the shared inputs of one check run.

type EntryPointInfo

type EntryPointInfo struct {
	ID   relation.NodeID
	Form string
	Name string
	// File is the site for findings: the resolves_to row's file when
	// present, else the member manifest.
	File string
	Span relation.Span
}

EntryPointInfo is one entry_point node with its site.

type ExportEdge

type ExportEdge struct {
	Src string
	Dst string
}

ExportEdge is one exports row (src module exports dst module).

type ModuleEdge

type ModuleEdge struct {
	Dst string
	Row relation.Row
}

ModuleEdge is one module->module imports row.

type ModuleInfo

type ModuleInfo struct {
	ID      relation.NodeID
	Logical string
	// Path is workspace-root-relative; MemberRel is member-root-relative.
	Path      string
	MemberRel string
	Test      bool
}

ModuleInfo is one module node's queryable projection.

type View

type View struct {
	WS  *workspace.Workspace
	Res *extract.Result

	// Modules: (lang, member) -> logical -> info.
	Modules map[langMember]map[string]*ModuleInfo
	// MemberImports: imports rows whose dst is a member node.
	MemberImports map[memberEdge][]relation.Row
	// DeclaredDeps: declares_dependency rows.
	DeclaredDeps map[memberEdge][]relation.Row
	// ModuleImports: (lang, member) -> src logical -> edges.
	ModuleImports map[langMember]map[string][]ModuleEdge
	// Exports: (lang, member) -> export edges.
	Exports map[langMember][]ExportEdge
	// EntryTargets: (lang, member) -> logicals reached by resolves_to rows.
	EntryTargets map[langMember][]string
	// EntryPoints: (lang, member) -> entry point infos.
	EntryPoints map[langMember][]EntryPointInfo

	// NodeKinds: serialized node ID -> kind (finding-target labeling).
	NodeKinds map[string]vocab.NodeKind
	// contains filtered or unexported fields
}

View indexes the relation for the checks. Built once per run from the one shared relation (lesson 30).

Jump to

Keyboard shortcuts

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