# Functions
AllStringsInSlice determines if `slice` contains the `strings`.
CapFirst capitalizes the first letter of a string.
CondSprintf is sprintf, ignores extra arguments.
DefaultConfig returns the path to the default configuration file.
DefaultStylesPath returns the path to the default styles directory.
FindAsset tries to locate a Vale-related resource by looking in the user-defined StylesPath.
FindConfigAsset tries to locate a Vale-related resource by looking in the user-defined StylesPath(s).
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`.
FromFile loads an INI configuration from a file.
FromString loads an INI configuration from a string.
No description provided by the author
Get the user-defined packages from a `.vale.ini` file.
No description provided by the author
IgnoreFiles returns a list of all user-defined ignore files.
Indent adds padding to every line of `text`.
InRange determines if the range r contains the integer n.
IntInSlice determines if `slice` contains the int `a`.
IsCode returns `true` if s is a code-like token.
IsLetter returns `true` if s contains all letter characters and false if not.
IsPhrase returns `true` is s is a phrase-like token.
MockLoad returns the would-be configuration after loading two files, one from the project and one from the user's local directory.
NewBlueprint creates a new blueprint from the given path.
NewConfig initializes a Config with its default values.
NewE100 creates a new, formatted "unexpected" error.
NewE201 creates a formatted user-generated error.
NewE201FromPosition creates a new E201 error from an in-file location.
NewE201FromTarget creates a new E201 error from a target string.
NewError creates a colored error from the given information.
NewFile initializes a File.
ReadPipeline loads Vale's configuration according to the local search process.
No description provided by the author
Sanitize prepares text for our check functions.
ShouldIgnoreDirectory will check if directory should be ignored.
SplitLines splits on CRLF, CR not followed by LF, and LF.
StringInSlice determines if `slice` contains the string `a`.
StringsToInterface converts a slice of strings to an interface.
StripANSI removes all ANSI characters from the given string.
Substitute replaces the substring `sub` with a string of asterisks.
No description provided by the author
ToSentence converts a slice of terms into sentence.
UniqueStrings returns a new slice with all duplicate strings removed.
WhitespaceToSpace converts newlines and multiple spaces (e.g., " ") into a single space.
# Variables
No description provided by the author
AlertLevels holds the possible values for "level" in an external rule.
No description provided by the author
CommentsByNormedExt determines what parts of a file we should lint -- e.g., we only want to lint // or /* comments in a C++ file.
ConfigDir is the default location for Vale's configuration files.
ConfigDirs is a list of all directories that contain user-defined, non-style configuration files.
ConfigVars is a list of all supported environment variables.
No description provided by the author
No description provided by the author
FormatByExtension associates a file extension with its "normed" extension and its format (markup, code or text).
No description provided by the author
LevelToInt allows us to easily compare levels in lint.go.
PipeDir is the default location for Vale's configuration pipeline.
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
An Action represents a possible solution to an Alert.
An Alert represents a potential error in prose.
A Blueprint is a set of queries that we want to run against a document.
CLIFlags holds the values that are defined at runtime by the user.
Config holds the configuration values from both the CLI and `.vale.ini`.
A File represents a linted text file.
A Scope is a single query that we want to run against a document.
A ScopedValues is a value that has been assigned a scope.
# Type aliases
ByName sorts Files by their path.
ByPosition sorts Alerts by line and column.
ConfigSrc is a source of configuration values.
No description provided by the author