lint

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

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

The package is split into core linting logic (this file), source code (code.go), and markup (markup.go). The general flow is to first read input into `Lint` (files and directories) or `LintString` (stdin) and then pass the processed input off to `lintFile` to choose a linter based on its format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Context string        // parent content (if any) - e.g., sentence -> paragraph
	Text    string        // text content
	Scope   core.Selector // section selector
}

A Block represents a section of text.

func NewBlock

func NewBlock(ctx string, txt string, sel string) Block

NewBlock makes a new Block with prepared text and a Selector.

type Linter

type Linter struct{}

A Linter lints a File.

func (Linter) Lint

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

Lint src according to its format.

func (Linter) LintString added in v0.4.0

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

LintString src according to its format.

Jump to

Keyboard shortcuts

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