nolintlint

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

nolintlint provides a linter for ensure that all //nolint directives are followed by explanations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseIssue

type BaseIssue struct {
	// contains filtered or unexported fields
}

func (BaseIssue) Position

func (b BaseIssue) Position() token.Position

type DirectivePatterns

type DirectivePatterns struct {
	// contains filtered or unexported fields
}

type Issue

type Issue interface {
	Details() string
	Position() token.Position
	String() string
}

type Linter

type Linter struct {
	// contains filtered or unexported fields
}

func NewLinter

func NewLinter(directives []string, needs Needs) *Linter

NewLinter creates a linter that enforces that the provided directives fulfill the provided requirements

func (Linter) Run

func (l Linter) Run(fset *token.FileSet, nodes ...ast.Node) ([]Issue, error)

type MultipleLeadingSpaces

type MultipleLeadingSpaces struct {
	BaseIssue
}

func (MultipleLeadingSpaces) Details

func (i MultipleLeadingSpaces) Details() string

func (MultipleLeadingSpaces) String

func (i MultipleLeadingSpaces) String() string

type Needs

type Needs uint
const (
	NeedsMachine Needs = 1 << iota
	NeedsSpecific
	NeedsExplanation
	NeedsAll = NeedsMachine | NeedsSpecific | NeedsExplanation
)

type NoExplanation

type NoExplanation struct {
	BaseIssue
}

func (NoExplanation) Details

func (i NoExplanation) Details() string

func (NoExplanation) String

func (i NoExplanation) String() string

type NotMachine

type NotMachine struct {
	BaseIssue
}

func (NotMachine) Details

func (i NotMachine) Details() string

func (NotMachine) String

func (i NotMachine) String() string

type NotSpecific

type NotSpecific struct {
	BaseIssue
}

func (NotSpecific) Details

func (i NotSpecific) Details() string

func (NotSpecific) String

func (i NotSpecific) String() string

Jump to

Keyboard shortcuts

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