lint

package
v3.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 40 Imported by: 0

Documentation

Overview

Package lint implements Vale's syntax-aware linting functionality.

The package is split into core linting logic (this file), source code (code.go), and markup (markup.go).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtendedHTMLWriter

type ExtendedHTMLWriter struct {
	*org.HTMLWriter
}

func (*ExtendedHTMLWriter) WriteComment

func (w *ExtendedHTMLWriter) WriteComment(n org.Comment)

type Linter

type Linter struct {
	Manager *check.Manager
	// contains filtered or unexported fields
}

A Linter lints a File.

func NewLinter

func NewLinter(cfg *core.Config) (*Linter, error)

NewLinter initializes a Linter.

func (*Linter) Lint

func (l *Linter) Lint(input []string, pat string) ([]*core.File, error)

Lint src according to its format.

func (*Linter) LintString

func (l *Linter) LintString(src string) ([]*core.File, error)

LintString src according to its format.

func (*Linter) Transform

func (l *Linter) Transform(f *core.File) (string, error)

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL