Documentation
¶
Index ¶
- func ExtractStemFromFilter(filter string) (stem string, absPath string, err error)
- func FindDestinationForStem(baseDir string, destinations []string, stem string) (string, error)
- func FindProjectRoot() (string, error)
- func ResolveFilterToDestination(baseDir string, destinations []string, filter string, originalFilter string) (destDir string, stem string, err error)
- type ParserMeta
- type RefEntry
- type RefItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractStemFromFilter ¶
ExtractStemFromFilter extracts the stem (base filename without extension) from a filter string. If the filter is a path, it resolves it and extracts the stem. Returns the stem and absolute path (if filter was a path), or error.
func FindDestinationForStem ¶
FindDestinationForStem searches for a stem in all destination directories and returns the unique destination directory path. Returns error if stem is not found or is ambiguous.
func FindProjectRoot ¶
FindProjectRoot searches for .git directory or tests/sources.json starting from current directory
func ResolveFilterToDestination ¶
func ResolveFilterToDestination(baseDir string, destinations []string, filter string, originalFilter string) (destDir string, stem string, err error)
ResolveFilterToDestination resolves a filter (stem or path) to a destination directory and normalized stem. It handles both simple stem names and full file paths.
Types ¶
type ParserMeta ¶
type ParserMeta struct {
ItemType string `json:"item_type"`
ItemSubtype string `json:"item_subtype"`
}
ParserMeta contains metadata about the parser
type RefEntry ¶
type RefEntry struct {
Source string `json:"source"`
SourceSHA1 string `json:"source_sha1"`
Name string `json:"name,omitempty"`
Method string `json:"method,omitempty"`
ParserName string `json:"parser_name,omitempty"`
ParserMeta map[string]interface{} `json:"parser_meta,omitempty"`
Items []RefItem `json:"items"`
}
RefEntry represents a source file entry in _refs.json
type RefItem ¶
type RefItem struct {
Destination string `json:"destination"`
Line int `json:"line,omitempty"`
Anchor string `json:"anchor,omitempty"`
ContentSHA1 string `json:"content_sha1"`
Outputs map[string]string `json:"outputs,omitempty"`
Heading string `json:"heading,omitempty"` // ### heading where test is defined
Section string `json:"section,omitempty"` // ## section where test is defined
Tags []string `json:"tags,omitempty"` // Test tags from @test-tags comment
}
RefItem represents a destination item in _refs.json