{"modulePath":"github.com/haproxytech/check-commit/v5","version":"v5.8.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package aspell\n\n## Functions\n\n```go\nfunc Append(filename string, words []string) (added, skipped []string, err error)\n```\nAppend adds words to the allowed list: local .aspell.yml, or a GitLab wiki page when remote\\_file points at one. Other remotes are refused to keep a single source of truth.\n\n```go\nfunc Init(filename string) error\n```\nInit creates a .aspell.yml file with all options commented out. Returns an error if the file already exists.\n\n```go\nfunc PrintHelp()\n```\nPrintHelp prints all available .aspell.yml configuration options to stdout.\n\n## Types\n\n```go\ntype Aspell struct {\n\t// RepoWords holds words derived from dependency manifests and repo paths.\n\tRepoWords           map[string]struct{} `yaml:\"-\"`\n\tRemoteFile          RemoteFile          `yaml:\"remote_file\"`\n\tMode                mode                `yaml:\"mode\"`\n\tHelpText            string              `yaml:\"-\"`\n\tIdentifierScope     identifierScope     `yaml:\"identifier_scope\"`\n\tDictionaries        DictionaryConfig    `yaml:\"dictionaries\"`\n\tIgnoreFiles         []string            `yaml:\"ignore_files\"`\n\tAllowedWords        []string            `yaml:\"allowed\"`\n\tExtraDicts          []string            `yaml:\"-\"` // paths to downloaded .rws files for aspell --extra-dicts\n\tMinLength           int                 `yaml:\"min_length\"`\n\tNoIgnoreIdentifiers bool                `yaml:\"no_ignore_identifiers\"`\n\tNoManifestWords     bool                `yaml:\"no_manifest_words\"`\n\tNoPathWords         bool                `yaml:\"no_path_words\"`\n}\n```\n\n```go\nfunc New(filename string) (Aspell, error)\n```\n\n```go\nfunc (a Aspell) Check(commits []Commit, content []CommitDiff, junitSuite junit.Interface, gitHashes map[string]struct{}) error\n```\n\n```go\ntype Commit struct {\n\tHash    string\n\tSubject string\n\tMessage string\n}\n```\nCommit carries the data needed to spell-check a single commit and to report which commit an error came from.\n\n```go\ntype CommitDiff struct {\n\tFiles   map[string]string // file path -\u003e added lines\n\tHash    string            // short commit hash; \"\" when not attributable\n\tSubject string            // commit subject line; \"\" when not attributable\n}\n```\nCommitDiff carries per-file added content, attributed to a commit when known.\n\n```go\ntype DictionaryConfig struct {\n\t// GitHub repo directories to fetch all dictionary files from.\n\t// Supports URLs like https://github.com/owner/repo/tree/branch/path/to/dir\n\tGitHub []GitHubDictionary `yaml:\"github\"`\n\t// GitLab repo directories to fetch all dictionary files from.\n\t// Supports URLs like https://gitlab.com/group/project/-/tree/branch/path/to/dir\n\tGitLab []GitLabDictionary `yaml:\"gitlab\"`\n\t// Direct URLs to individual dictionary files (.txt or .rws).\n\tURLs []string `yaml:\"urls\"`\n}\n```\nDictionaryConfig holds configuration for fetching dictionaries from remote sources.\n\n```go\ntype GitHubDictionary struct {\n\t// URL to a GitHub directory, e.g. https://github.com/haproxytech/check-commit/tree/main/aspell/dictionaries\n\tURL string `yaml:\"url\"`\n\t// Optional environment variable name containing a GitHub token for private repos.\n\tTokenEnv string `yaml:\"token_env\"`\n}\n```\nGitHubDictionary configures fetching dictionaries from a GitHub repository directory.\n\n```go\ntype GitLabDictionary struct {\n\t// URL to a GitLab directory, e.g. https://gitlab.com/group/project/-/tree/main/path/to/dir\n\t// Also supports self-hosted instances like https://gitlab.example.com/group/project/-/tree/main/path\n\tURL string `yaml:\"url\"`\n\t// Optional environment variable name containing a GitLab private token.\n\tTokenEnv string `yaml:\"token_env\"`\n}\n```\nGitLabDictionary configures fetching dictionaries from a GitLab repository directory.\n\n```go\ntype RemoteFile struct {\n\tURL             string `yaml:\"url\"`\n\tURLEnv          string `yaml:\"url_env\"`\n\tHeaderFromENV   string `yaml:\"header_from_env\"`\n\tPrivateTokenENV string `yaml:\"private_token_env\"`\n\tAllowedItemsKey string `yaml:\"allowed_items_key\"`\n}\n```\n\n","path":"github.com/haproxytech/check-commit/v5/aspell","name":"aspell","synopsis":"","isRedistributable":true}
