aspell

package
v5.5.4 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init added in v5.5.4

func Init(filename string) error

Init creates a .aspell.yml file with all options commented out. Returns an error if the file already exists.

func PrintHelp added in v5.5.4

func PrintHelp()

PrintHelp prints all available .aspell.yml configuration options to stdout.

Types

type Aspell

type Aspell struct {
	RemoteFile          RemoteFile       `yaml:"remote_file"`
	Mode                mode             `yaml:"mode"`
	HelpText            string           `yaml:"-"`
	IdentifierScope     identifierScope  `yaml:"identifier_scope"`
	Dictionaries        DictionaryConfig `yaml:"dictionaries"`
	IgnoreFiles         []string         `yaml:"ignore_files"`
	AllowedWords        []string         `yaml:"allowed"`
	ExtraDicts          []string         `yaml:"-"` // paths to downloaded .rws files for aspell --extra-dicts
	MinLength           int              `yaml:"min_length"`
	NoIgnoreIdentifiers bool             `yaml:"no_ignore_identifiers"`
}

func New

func New(filename string) (Aspell, error)

func (Aspell) Check

func (a Aspell) Check(subjects []string, commitsFull []string, content []map[string]string, junitSuite junit.Interface, gitHashes map[string]struct{}) error

type DictionaryConfig added in v5.5.4

type DictionaryConfig struct {
	// GitHub repo directories to fetch all dictionary files from.
	// Supports URLs like https://github.com/owner/repo/tree/branch/path/to/dir
	GitHub []GitHubDictionary `yaml:"github"`
	// GitLab repo directories to fetch all dictionary files from.
	// Supports URLs like https://gitlab.com/group/project/-/tree/branch/path/to/dir
	GitLab []GitLabDictionary `yaml:"gitlab"`
	// Direct URLs to individual dictionary files (.txt or .rws).
	URLs []string `yaml:"urls"`
}

DictionaryConfig holds configuration for fetching dictionaries from remote sources.

type GitHubDictionary added in v5.5.4

type GitHubDictionary struct {
	// URL to a GitHub directory, e.g. https://github.com/haproxytech/check-commit/tree/main/aspell/dictionaries
	URL string `yaml:"url"`
	// Optional environment variable name containing a GitHub token for private repos.
	TokenEnv string `yaml:"token_env"`
}

GitHubDictionary configures fetching dictionaries from a GitHub repository directory.

type GitLabDictionary added in v5.5.4

type GitLabDictionary struct {
	// URL to a GitLab directory, e.g. https://gitlab.com/group/project/-/tree/main/path/to/dir
	// Also supports self-hosted instances like https://gitlab.example.com/group/project/-/tree/main/path
	URL string `yaml:"url"`
	// Optional environment variable name containing a GitLab private token.
	TokenEnv string `yaml:"token_env"`
}

GitLabDictionary configures fetching dictionaries from a GitLab repository directory.

type RemoteFile added in v5.1.0

type RemoteFile struct {
	URL             string `yaml:"url"`
	URLEnv          string `yaml:"url_env"`
	HeaderFromENV   string `yaml:"header_from_env"`
	PrivateTokenENV string `yaml:"private_token_env"`
	AllowedItemsKey string `yaml:"allowed_items_key"`
}

Jump to

Keyboard shortcuts

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