Documentation
¶
Overview ¶
Package graph groups source files into logical subsystems for blueprint record generation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CoveredDirs ¶ added in v3.17.0
CoveredDirs returns the set of directories containing at least one of routeFiles. A directory in this set already has framework-based blueprint coverage (it contributed a route to some group) and must not be re-grouped by a supplemental, framework-agnostic pass — otherwise the same directory would receive two blueprint records.
Types ¶
type DirectoryGrouper ¶
type DirectoryGrouper struct{}
DirectoryGrouper groups files by their containing directory.
type File ¶
type File struct {
Path string // relative to the scan root
Lang lang.Language
Symbols []symbols.Symbol
Imports []string
}
File is one source file discovered during a framework-agnostic scan.
func CoveredDirExtras ¶ added in v3.17.0
CoveredDirExtras returns the subset of files whose containing directory is in covered but whose own path is not itself one of routeFiles — e.g. helper.go living next to router.go in the same package. FilterUncovered already excludes their whole directory from the framework-agnostic supplemental pass (so the directory never gets a second, duplicate blueprint), but without this they were dropped from coverage entirely instead of being merged into the route group's existing blueprint.
type Grouper ¶
Grouper clusters discovered files into logical groups for blueprint record generation. Directory grouping (Option A, see DirectoryGrouper) is the default. A future community-detection grouper (Option B — clustering by import graph connectivity) can implement this interface and be substituted in without changing the rest of the discover pipeline.