package
1.7.1
Repository: https://github.com/errata-ai/vale.git
Documentation: pkg.go.dev

# Functions

AllStringsInSlice determines if `slice` contains the `strings`.
CheckAndClose closes `file` and prints any errors to stdout.
CheckError prints any errors to stdout.
CheckPOS determines if a match (as found by an extension point) also matches the expected part-of-speech in text.
ContainsAny determines if `text` contains any string in `slice`.
CopyDir from a source file system to destination file system.
CopyFile from a source file sysmtem to destination file system.
DeterminePath decides if `keyPath` is relative or absolute.
DumpConfig returns Vale's configuration in JSON format.
FileExists determines if the path given by `filename` exists.
FormatAlert ensures that all required fields have data.
FormatFromExt takes a file extension and returns its [normExt, format] list, if supported.
FormatMessage inserts `subs` into `msg`.
HasAnyPrefix determines if `text` has any prefix contained in `slice`.
Indent adds padding to every line of `text`.
InRange determines if the range r contains the integer n.
IsDir determines if the path given by `filename` is a directory.
IsLetter returns `true` if s contains all letter characters and false if not.
JaroWinkler searches `ctx` line-by-line for a JaroWinkler distance score greater than a particular threshold.
LoadConfig reads the .vale/_vale file.
LooksLikeStdin determines if s appears to be a string.
Max returns the max of `a` and `b`.
Min returns the min of `a` and `b`.
NewConfig initializes a Config.
NewFile initilizes a File.
NewGlob creates a Glob from the string pat.
PrepText prepares text for our check functions.
SlicesEqual determines if the slices a and b are equal.
SplitLines splits on CRLF, CR not followed by LF, and LF.
Stat checks if we have anything waiting in stdin.
StringInSlice determines if `slice` contains the string `a`.
StringsToInterface converts a slice of strings to an interface.
Substitute replaces the substring `sub` with a string of asterisks.
TextToWords convert raw text into a slice of words.
Which checks for the existence of any command in `cmds`.

# Variables

AlertLevels holds the possible values for "level" in an external rule.
CommentsByNormedExt determines what parts of a file we should lint -- e.g., we only want to lint // or /* comments in a C++ file.
ExeDir is our starting location.
FormatByExtension associates a file extension with its "normed" extension and its format (markup, code or text).
LevelToInt allows us to easily compare levels in lint.go.
SentenceTokenizer splits text into sentences.
Tagger tags a sentence.
WordTokenizer splits text into words.

# Structs

An Alert represents a potential error in prose.
Config holds Vale's configuration, both from the CLI and its config file.
A File represents a linted text file.
Glob represents a glob pattern passed via `--glob`.
A Plugin provides a means of extending Vale.
A Selector represents a named section of text.

# Type aliases

ByName sorts Files by their path.
ByPosition sorts Alerts by line and column.