Help us shape the future of Go! Take the 2026 Go Developer Survey

check

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllChecks = map[string]Check{}

AllChecks holds all of our individual checks. The keys are in the form "styleName.checkName".

Functions

This section is empty.

Types

type Check

type Check struct {
	Extends string
	Level   int
	Rule    ruleFn
	Scope   core.Selector
}

A Check implements a single rule.

type Conditional

type Conditional struct {
	Definition `mapstructure:",squash"`
	Ignorecase bool
	First      string
	Second     string
	Exceptions []string
}

Conditional ensures that the present of First ensures the present of Second.

type Consistency

type Consistency struct {
	Definition `mapstructure:",squash"`
	Nonword    bool
	Ignorecase bool
	Either     map[string]string
}

Consistency ensures that the keys and values of Either don't both exist.

type Definition

type Definition struct {
	Description string
	Extends     string
	Level       string
	Link        string
	Message     string
	Name        string
	Scope       string
}

Definition holds the common attributes of rule definitions.

type Existence

type Existence struct {
	Definition `mapstructure:",squash"`
	Ignorecase bool
	Nonword    bool
	Raw        []string
	Tokens     []string
}

Existence checks for the present of Tokens.

type Occurrence

type Occurrence struct {
	Definition `mapstructure:",squash"`
	Max        int
	Token      string
}

Occurrence counts the number of times Token appears.

type Repetition

type Repetition struct {
	Definition `mapstructure:",squash"`
	Max        int
	Ignorecase bool
	Tokens     []string
}

Repetition looks for repeated uses of Tokens.

type Script

type Script struct {
	Definition `mapstructure:",squash"`
	Exe        string
	Runtime    string
}

Script runs Exe with Runtime.

type Substitution

type Substitution struct {
	Definition `mapstructure:",squash"`
	Ignorecase bool
	Nonword    bool
	Swap       map[string]string
}

Substitution switches the values of Swap for its keys.

Jump to

Keyboard shortcuts

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