config

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRequiredReachableMaxFileSizeBytes int64 = 32 * 1024

Variables

View Source
var DefaultNames = []string{
	".context-lint.yaml",
	".context-lint.yml",
	".context-lint.json",
	".context-lint.jsonc",
}

Functions

func Discover

func Discover(root string, explicit string) (string, error)

Types

type Config

type Config struct {
	Linter LinterConfig `json:"linter" yaml:"linter"`
}

func Load

func Load(path string) (Config, error)

type DocumentConfig

type DocumentConfig struct {
	Entry                        string            `json:"entry" yaml:"entry"`
	RequiredReachable            []string          `json:"requiredReachable" yaml:"requiredReachable"`
	RequiredReachableMaxFileSize FileSize          `json:"requiredReachableMaxFileSize" yaml:"requiredReachableMaxFileSize"`
	Excludes                     []string          `json:"excludes" yaml:"excludes"`
	FrontMatter                  FrontMatterConfig `json:"frontMatter" yaml:"frontMatter"`
}

type FileSize added in v1.0.4

type FileSize struct {
	Bytes int64
	Set   bool
}

func (*FileSize) EffectiveBytes added in v1.0.4

func (s *FileSize) EffectiveBytes(defaultBytes int64) int64

func (*FileSize) UnmarshalJSON added in v1.0.4

func (s *FileSize) UnmarshalJSON(data []byte) error

func (*FileSize) UnmarshalYAML added in v1.0.4

func (s *FileSize) UnmarshalYAML(value *yaml.Node) error

type FrontMatterConfig added in v1.0.3

type FrontMatterConfig struct {
	ExcludeFileNames []string `json:"excludeFileNames" yaml:"excludeFileNames"`
}

type LinterConfig

type LinterConfig struct {
	Document DocumentConfig `json:"document" yaml:"document"`
}

Jump to

Keyboard shortcuts

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