MCPcopy Create free account
hub / github.com/vale-cli/vale / Transform

Method Transform

internal/lint/lint.go:56–63  ·  view source on GitHub ↗

Transform applies the configured transformations to text and returns the result. This is used by the `vale` command to apply transformations to text before linting it. Transformations include block and token ignores, as well as some built-in replacements.

(f *core.File)

Source from the content-addressed store, hash-verified

54// Transformations include block and token ignores, as well as some built-in
55// replacements.
56func (l *Linter) Transform(f *core.File) (string, error) {
57 exts := extensionConfig{
58 Normed: f.NormedExt,
59 Real: f.RealExt,
60 }
61
62 return applyPatterns(l.Manager.Config, exts, f.Content)
63}
64
65// LintString src according to its format.
66func (l *Linter) LintString(src string) ([]*core.File, error) {

Callers 6

lintMarkdownMethod · 0.95
lintOrgMethod · 0.95
lintRSTMethod · 0.95
lintMDXMethod · 0.95
lintADocMethod · 0.95
transformFunction · 0.95

Calls 1

applyPatternsFunction · 0.85

Tested by

no test coverage detected