Versions in this module Expand all Collapse all v1 v1.2.1 Feb 9, 2026 Changes in this version + const HTML + const Markdown + const PDF + const TXT + const UNKNOWN + var ErrorAnchorNotSupportedOnUnstructuredDocument = errors.New("error collecting document, fragment or anchor not supported on this document") + var ErrorCollectingBadURL = errors.New("error collecting document, bad URL") + var ErrorCollectingNoDocumentParser = errors.New("error collecting document, no document parser for document type") + var ErrorCollectingUnknownDocumentType = errors.New("error collecting document, unknown document type") + var ErrorParsing = errors.New("error parsing document") + var IgnoredPaths = []string + func DisplayMatchResults(matchedResults []MatcherResult) + func FindAllInlineReferences(workingDir string) (map[NormalizedPath][]inline.InlineReference, error) + func FindInlineReferencesInFile(path string) []inline.InlineReference + func GetStagedFiles(workingDir string) []string + func LoadGitignore(workingDir string) ([]string, error) + func LoadSemignore(workingDir string) ([]string, error) + func MatchesPattern(filePath, pattern string) bool + func MatchesPatterns(filePath string, patterns []string) bool + func NormalizedPathsToStrings(paths []NormalizedPath) []string + type CollectedDocument struct + Type DocumentType + func CollectDocument(url *url.URL) (CollectedDocument, error) + func UnstructuredDocument(content []byte) CollectedDocument + func (s *CollectedDocument) GetAnchoredSection(anchor string) (string, error) + func (s *CollectedDocument) IsStructuredDocument() bool + type DocumentCollection struct + DocumentCache map[string]CollectedDocument + func NewDocumentCollection() DocumentCollection + func (dc *DocumentCollection) GetDocument(path string) (string, error) + type DocumentParser interface + Parse func(content []byte) (CollectedDocument, error) + func NewHTMLParser() DocumentParser + func NewMarkdownParser() DocumentParser + type DocumentType string + type FileType int + const FileTypeIgnored + const FileTypeImpl + const FileTypeSpec + type IgnoreReason int + const IgnoreReasonExcludedByRule + const IgnoreReasonIgnore + const IgnoreReasonNoRuleMatch + const IgnoreReasonNone + func (r IgnoreReason) String() string + type Matcher struct + func NewMatcher(cfg *config.Config, workingDir string) (*Matcher, error) + func (m *Matcher) GetAllMatcherResults() []MatcherResult + func (m *Matcher) GetRuleImplFiles(ruleName string) []NormalizedPath + func (m *Matcher) GetRuleSpecFiles(ruleName string) []NormalizedPath + func (m *Matcher) MatchFiles(inputFiles []string) ([]MatcherResult, error) + type MatcherResult struct + IgnoreReason IgnoreReason + Path NormalizedPath + RuleName string + Type FileType + type NormalizedPath string + func NormalizePath(path string) NormalizedPath + type RuleFileMap map[string][]NormalizedPath