Help us shape the future of Go! Take the 2026 Go Developer Survey

codescan

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

ENGMODEL-OWNER-UNIT: FU-CODEMAP-INFERENCE

ENGMODEL-OWNER-UNIT: FU-CODEMAP-INFERENCE

ENGMODEL-OWNER-UNIT: FU-CODEMAP-INFERENCE

ENGMODEL-OWNER-UNIT: FU-CODEMAP-INFERENCE

ENGMODEL-OWNER-UNIT: FU-CODEMAP-INFERENCE

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvidenceFileKey

func EvidenceFileKey(elem string) string

TRLC-LINKS: REQ-EMG-003

func EvidenceLabel

func EvidenceLabel(elem string) string

ENGMODEL-LINKS: FU-ASCIIDOC-GENERATOR, FU-CODEMAP-INFERENCE, CTRL-TRACEABILITY-COVERAGE, DEP-LOCAL-WORKSPACE TRLC-LINKS: REQ-EMG-003

func EvidenceLabelLookup

func EvidenceLabelLookup(elems []string) map[string]string

TRLC-LINKS: REQ-EMG-003

func GroupedEvidenceLabels

func GroupedEvidenceLabels(elems []string, lookup map[string]string) []string

ENGMODEL-LINKS: FU-ASCIIDOC-GENERATOR, FU-CODEMAP-INFERENCE, CTRL-TRACEABILITY-COVERAGE, DEP-LOCAL-WORKSPACE TRLC-LINKS: REQ-EMG-003

func GroupedFileLabels

func GroupedFileLabels(elems []string, lookup map[string]string) []string

TRLC-LINKS: REQ-EMG-003

func IsVerificationCodeItem

func IsVerificationCodeItem(item CodeItem) bool

IsVerificationCodeItem reports whether a code item is test code rather than production implementation: it lives in a test file, or it is a Rust item compiled only for tests (#[cfg(test)] module or #![cfg(test)] file). TRLC-LINKS: REQ-EMG-010, REQ-EMG-030

func ItemDisplayName

func ItemDisplayName(c CodeItem) string

TRLC-LINKS: REQ-EMG-003

func ItemEvidenceElement

func ItemEvidenceElement(c CodeItem) string

TRLC-LINKS: REQ-EMG-003

func ItemPath

func ItemPath(c CodeItem) string

TRLC-LINKS: REQ-EMG-003

func JoinLineNumbers

func JoinLineNumbers(lines []int) string

TRLC-LINKS: REQ-EMG-003

func LanguageFromPath

func LanguageFromPath(p string) string

TRLC-LINKS: REQ-EMG-003

func LoadBundle

func LoadBundle(manifestPath string) (model.Bundle, error)

LoadBundle loads a model bundle and attaches its lazily built CODE identifier index, so validation can resolve authored references to in-repository files and declarations. TRLC-LINKS: REQ-EMG-059 ENGMODEL-LINKS: FU-MODEL-LOADER, FU-CODEMAP-INFERENCE

func ModelRootDir

func ModelRootDir(bundle model.Bundle) string

TRLC-LINKS: REQ-EMG-010

func NormalizeResultStatus

func NormalizeResultStatus(s string) string

ENGMODEL-LINKS: FU-CODEMAP-INFERENCE, CTRL-TRACEABILITY-COVERAGE, DEP-LOCAL-WORKSPACE TRLC-LINKS: REQ-EMG-010

func ParseLineNumberList

func ParseLineNumberList(s string) ([]int, bool)

TRLC-LINKS: REQ-EMG-003

func SanitizeNode

func SanitizeNode(s string) string

TRLC-LINKS: REQ-EMG-003

func SanitizeSourcePath

func SanitizeSourcePath(in string) string

TRLC-LINKS: REQ-EMG-003

func SkipScanDir

func SkipScanDir(name string) bool

ENGMODEL-LINKS: FU-CODEMAP-INFERENCE, CTRL-TRACEABILITY-COVERAGE, DEP-LOCAL-WORKSPACE SkipScanDir reports whether a directory must be excluded from code/metadata walks. Dependency caches and dot-directories (tool caches like .opencode, the .engmod composition cache, .git) are not source; scanning them makes generated artifacts depend on the local environment and breaks reproducibility. TRLC-LINKS: REQ-EMG-010, REQ-EMG-012 ENGMODEL-LINKS: FU-CODEMAP-INFERENCE, DEP-LOCAL-WORKSPACE

func SplitEvidencePathLines

func SplitEvidencePathLines(elem string) (string, []int, bool)

TRLC-LINKS: REQ-EMG-003

func SplitSourceLine

func SplitSourceLine(source string) (string, int)

SplitSourceLine splits an inferred code item Source ("path:line") into path and line. TRLC-LINKS: REQ-EMG-030 ENGMODEL-LINKS: FU-CODEMAP-INFERENCE

func UniqueExistingSources

func UniqueExistingSources(in []string) []string

TRLC-LINKS: REQ-EMG-010

func WithCodeIndex

func WithCodeIndex(bundle model.Bundle) model.Bundle

WithCodeIndex attaches the lazily built CODE identifier index unless the bundle has one, so bundles loaded by callers with model.LoadBundle resolve CODE references too. An in-memory bundle without a manifest or architecture path has no module root and gets none. TRLC-LINKS: REQ-EMG-059 ENGMODEL-LINKS: FU-MODEL-LOADER, FU-CODEMAP-INFERENCE

func WithDefaultCodeRoot

func WithDefaultCodeRoot(bundle model.Bundle, roots []string) []string

WithDefaultCodeRoot falls back to the module root when no existing code root is given. TRLC-LINKS: REQ-EMG-057 ENGMODEL-LINKS: FU-CODEMAP-INFERENCE

Types

type CodeItem

type CodeItem struct {
	Element      string
	Kind         string
	Owner        string
	Description  string
	Source       string
	AbsPath      string // absolute file path (symbol items), for unambiguous model-boundary scoping
	EvidencePath string // model-relative path for portable publication evidence
	Implements   []string
	ModelLinks   []string
}

ENGMODEL-LINKS: FU-CODEMAP-INFERENCE, CTRL-TRACEABILITY-COVERAGE, DEP-LOCAL-WORKSPACE

func InferCodeItems

func InferCodeItems(bundle model.Bundle, codeRootOption string) ([]CodeItem, []validate.Diagnostic)

ENGMODEL-LINKS: FU-CODEMAP-INFERENCE, CTRL-TRACEABILITY-COVERAGE, DEP-LOCAL-WORKSPACE TRLC-LINKS: REQ-EMG-010, REQ-EMG-057

type RuntimeItem

type RuntimeItem struct {
	Name        string
	Kind        string
	Owner       string
	Description string
	Source      string
	Ports       []string
}

ENGMODEL-LINKS: FU-CODEMAP-INFERENCE, CTRL-TRACEABILITY-COVERAGE, DEP-LOCAL-WORKSPACE

func InferRuntimeItems

func InferRuntimeItems(bundle model.Bundle) ([]RuntimeItem, []validate.Diagnostic)

ENGMODEL-LINKS: FU-CODEMAP-INFERENCE, CTRL-TRACEABILITY-COVERAGE, DEP-LOCAL-WORKSPACE TRLC-LINKS: REQ-EMG-010

type VerificationCheck

type VerificationCheck struct {
	ID            string
	Name          string
	Kind          string
	Status        string
	Description   string
	Verifies      []string
	CodeElements  []string
	DerivedOwners []string
	Evidence      []string
	Results       []VerificationResult
}

ENGMODEL-LINKS: FU-CODEMAP-INFERENCE, CTRL-TRACEABILITY-COVERAGE, DEP-LOCAL-WORKSPACE

func InferVerificationChecks

func InferVerificationChecks(bundle model.Bundle, requirements model.RequirementsDocument, inferredCode []CodeItem, codeRootOption string) ([]VerificationCheck, []validate.Diagnostic)

ENGMODEL-LINKS: FU-CODEMAP-INFERENCE, CTRL-TRACEABILITY-COVERAGE, DEP-LOCAL-WORKSPACE TRLC-LINKS: REQ-EMG-010

type VerificationResult

type VerificationResult struct {
	Requirement string
	Status      string
	Evidence    string
	Notes       string
}

ENGMODEL-LINKS: FU-CODEMAP-INFERENCE, CTRL-TRACEABILITY-COVERAGE, DEP-LOCAL-WORKSPACE

Jump to

Keyboard shortcuts

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