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)
| 54 | // Transformations include block and token ignores, as well as some built-in |
| 55 | // replacements. |
| 56 | func (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. |
| 66 | func (l *Linter) LintString(src string) ([]*core.File, error) { |
no test coverage detected