Documentation
¶
Overview ¶
Package registry owns the global language lookup tables and the shared path-convention rules. Drivers register themselves here; the facade (internal/lang) is what external consumers import.
Index ¶
- func ByID(id types.ID) (types.Language, bool)
- func Classify(path string) types.Classification
- func ForPath(path string) (types.Language, bool)
- func Imports(path, moduleRoot string, content []byte) []string
- func Register(l types.Language)
- func ShouldSkipSmart(path, filename string, content []byte) (bool, string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Classify ¶
func Classify(path string) types.Classification
Classify applies shared conventions and then the language driver rules.
func Imports ¶
Imports returns the import targets referenced by a file, resolved to repo-relative path prefixes. The path's language driver owns the import syntax; paths with no registered ImportScanner contribute no fan-in.
func Register ¶
Register adds a language to the registry. Registering the same ID replaces the previous entry.
func ShouldSkipSmart ¶
ShouldSkipSmart reports whether any registered language's smart rules skip the file. Every rule is applied to every path, so cross-language artifacts (e.g. package-lock.json) are still caught regardless of the file's own language, matching the historical flat rule list behavior.
Types ¶
This section is empty.