checker

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinkChecker

type LinkChecker struct {
	// contains filtered or unexported fields
}

LinkChecker orchestrates link collection and validation

func NewLinkChecker

func NewLinkChecker(site *core.Site, config core.LinkCheckConfig) *LinkChecker

NewLinkChecker creates a new link checker

func (*LinkChecker) Check

func (c *LinkChecker) Check() error

Check runs the link checker and returns an error if links are broken and mode is "error"

type LinkCollector

type LinkCollector struct {
	// contains filtered or unexported fields
}

LinkCollector collects links from markdown files

func NewLinkCollector

func NewLinkCollector(docsRoot string) *LinkCollector

NewLinkCollector creates a new link collector

func (*LinkCollector) CollectFromFile

func (c *LinkCollector) CollectFromFile(filePath string) error

CollectFromFile extracts all links from a markdown file

func (*LinkCollector) CollectFromPages

func (c *LinkCollector) CollectFromPages(pages []*core.Page)

CollectFromPages collects links from all pages in the site

func (c *LinkCollector) Links() []core.CollectedLink

Links returns all collected links

type LinkValidator

type LinkValidator struct {
	// contains filtered or unexported fields
}

LinkValidator validates collected links

func NewLinkValidator

func NewLinkValidator(config core.LinkCheckConfig, outputRoot, docsRoot, basePath string, cleanURLs bool) *LinkValidator

NewLinkValidator creates a new link validator

func (*LinkValidator) Validate

func (v *LinkValidator) Validate(links []core.CollectedLink) *core.LinkCheckResult

Validate checks all collected links and returns results

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

Reporter formats and outputs link check results

func NewReporter

func NewReporter(mode core.LinkCheckMode) *Reporter

NewReporter creates a new reporter

func (*Reporter) FormatSummary

func (r *Reporter) FormatSummary(result *core.LinkCheckResult) string

FormatSummary returns a one-line summary suitable for build output

func (*Reporter) Report

func (r *Reporter) Report(result *core.LinkCheckResult)

Report outputs the link check results

Jump to

Keyboard shortcuts

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